4 $(RUSTC) foo.rs --crate-type=rlib,dylib,staticlib
5 $(call REMOVE_RLIBS,bar)
6 $(call REMOVE_DYLIBS,bar)
8 rm -f $(TMPDIR)/bar.{exp,lib,pdb}
9 # Check that $(TMPDIR) is empty.
10 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
12 $(RUSTC) foo.rs --crate-type=bin
13 rm $(TMPDIR)/$(call BIN,bar)
14 rm -f $(TMPDIR)/bar.pdb
15 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
17 $(RUSTC) foo.rs --emit=asm,llvm-ir,llvm-bc,obj,link
22 rm $(TMPDIR)/$(call BIN,bar)
23 rm -f $(TMPDIR)/bar.pdb
24 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
26 $(RUSTC) foo.rs --emit=asm -o $(TMPDIR)/foo
28 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
30 $(RUSTC) foo.rs --emit=llvm-bc -o $(TMPDIR)/foo
32 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
34 $(RUSTC) foo.rs --emit=llvm-ir -o $(TMPDIR)/foo
36 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
38 $(RUSTC) foo.rs --emit=obj -o $(TMPDIR)/foo
40 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
42 $(RUSTC) foo.rs --emit=link -o $(TMPDIR)/$(call BIN,foo)
43 rm $(TMPDIR)/$(call BIN,foo)
44 rm -f $(TMPDIR)/foo.pdb
45 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
47 $(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo
49 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
51 $(RUSTC) foo.rs --crate-type=dylib -o $(TMPDIR)/$(call BIN,foo)
52 rm $(TMPDIR)/$(call BIN,foo)
53 rm -f $(TMPDIR)/foo.{exp,lib,pdb}
54 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
56 $(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo
58 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
60 $(RUSTC) foo.rs --crate-type=bin -o $(TMPDIR)/$(call BIN,foo)
61 rm $(TMPDIR)/$(call BIN,foo)
62 rm -f $(TMPDIR)/foo.pdb
63 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
65 $(RUSTC) foo.rs --emit=asm,llvm-ir,llvm-bc,obj,link --crate-type=staticlib
70 mv $(TMPDIR)/bar.bc $(TMPDIR)/foo.bc
71 # Don't check that the $(TMPDIR) is empty - we left `foo.bc` for later
74 $(RUSTC) foo.rs --emit=llvm-bc,link --crate-type=rlib
75 cmp $(TMPDIR)/foo.bc $(TMPDIR)/bar.bc
78 $(call REMOVE_RLIBS,bar)
79 [ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]