File tree 5 files changed +9
-10
lines changed
5 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ all: $(TMPDIR)/$(call BIN,bar)
7
7
8
8
ifdef IS_MSVC
9
9
$(TMPDIR ) /$(call BIN,bar) : $(call DYLIB,foo)
10
- $(CC ) bar.c $(TMPDIR ) /foo.lib $(call OUT_EXE,bar)
10
+ $(CC ) bar.c $(TMPDIR ) /foo.dll. lib $(call OUT_EXE,bar)
11
11
else
12
12
$(TMPDIR ) /$(call BIN,bar) : $(call DYLIB,foo)
13
13
$(CC ) bar.c -lfoo -o $(call RUN_BINFILE,bar) -L $(TMPDIR )
Original file line number Diff line number Diff line change 4
4
ifneq ($(shell uname) ,FreeBSD)
5
5
all :
6
6
$(RUSTC ) foo.rs
7
- cp $(TMPDIR ) /libfoo.a $(call NATIVE_STATICLIB,foo2)
8
- $(CC ) bar.c $(call NATIVE_STATICLIB,foo2) $(call OUT_EXE,bar) \
7
+ $(CC ) bar.c $(call STATICLIB,foo) $(call OUT_EXE,bar) \
9
8
$(EXTRACFLAGS ) $(EXTRACXXFLAGS )
10
9
$(call RUN,bar)
11
- rm $(call STATICLIB,foo* )
10
+ rm $(call STATICLIB,foo)
12
11
$(call RUN,bar)
13
12
14
13
else
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ CC := $(CC:-g=)
5
5
6
6
all :
7
7
$(RUSTC ) foo.rs -C lto
8
- $(CC ) bar.c $(TMPDIR ) /libfoo.a \
8
+ $(CC ) bar.c $(call STATICLIB,foo) \
9
9
$(call OUT_EXE,bar) \
10
10
$(EXTRACFLAGS ) $(EXTRACXXFLAGS )
11
11
$(call RUN,bar)
Original file line number Diff line number Diff line change 4
4
$(RUSTC ) foo.rs --crate-type=rlib,dylib,staticlib
5
5
$(call REMOVE_RLIBS,bar)
6
6
$(call REMOVE_DYLIBS,bar)
7
- rm $(TMPDIR ) /libbar.a
8
- rm -f $(TMPDIR ) /bar.{exp,lib,pdb}
7
+ rm $(call STATICLIB,bar)
8
+ rm -f $(TMPDIR ) /bar.{dll. exp,dll. lib,pdb}
9
9
# Check that $(TMPDIR) is empty.
10
10
[ " $$ (ls -1 $( TMPDIR) | wc -l)" -eq " 0" ]
11
11
78
78
rm $(TMPDIR)/$(call BIN,foo)
79
79
$(RUSTC) foo.rs --crate-type=dylib --emit=link=$(TMPDIR)/$(call BIN,foo)
80
80
rm $(TMPDIR)/$(call BIN,foo)
81
- rm -f $(TMPDIR)/foo.{exp,lib,pdb}
81
+ rm -f $(TMPDIR)/foo.{dll. exp,dll. lib,pdb}
82
82
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
83
83
84
84
$(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo
133
133
rm $(TMPDIR)/bar.ll
134
134
rm $(TMPDIR)/bar.s
135
135
rm $(TMPDIR)/bar.o
136
- rm $(TMPDIR)/libbar.a
136
+ rm $(call STATICLIB,bar)
137
137
mv $(TMPDIR)/bar.bc $(TMPDIR)/foo.bc
138
138
# Don't check that the $(TMPDIR) is empty - we left `foo.bc` for later
139
139
# comparison.
Original file line number Diff line number Diff line change 2
2
3
3
TO_LINK := $(call DYLIB,bar)
4
4
ifdef IS_MSVC
5
- LINK_ARG = $(TO_LINK:dll=lib )
5
+ LINK_ARG = $(TO_LINK:dll=dll. lib )
6
6
else
7
7
LINK_ARG = $(TO_LINK )
8
8
endif
You can’t perform that action at this time.
0 commit comments