We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83f96e8 commit d6fc366Copy full SHA for d6fc366
tests/run-make/staticlib-dylib-linkage/Makefile
@@ -1,5 +1,7 @@
1
include ../tools.mk
2
3
+# ignore-msvc FIXME(bjorn3) can't figure out how to link with the MSVC toolchain
4
+
5
all:
6
$(RUSTC) -C prefer-dynamic bar.rs
7
$(RUSTC) foo.rs --crate-type staticlib --print native-static-libs \
@@ -8,7 +10,8 @@ all:
8
10
cat $(TMPDIR)/libs.txt
9
11
12
ifdef IS_MSVC
- $(CC) $(CFLAGS) foo.c $(TMPDIR)/foo.lib $$(cat $(TMPDIR)/libs.txt) $(call OUT_EXE,foo)
13
+ $(CC) $(CFLAGS) /c foo.c /Fo:$(TMPDIR)/foo.o
14
+ $(RUSTC_LINKER) $(TMPDIR)/foo.o $(TMPDIR)/foo.lib $$(cat $(TMPDIR)/libs.txt) $(call OUT_EXE,foo)
15
else
16
$(CC) $(CFLAGS) foo.c -L $(TMPDIR) -lfoo $$(cat $(TMPDIR)/libs.txt) -o $(call RUN_BINFILE,foo)
17
endif
0 commit comments