-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rmake: Get all tests passing on MSVC
- Loading branch information
1 parent
3887ca2
commit 0675dff
Showing
34 changed files
with
155 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
// ignore-license | ||
#ifdef _WIN32 | ||
__declspec(dllexport) | ||
#endif | ||
int foo() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
// ignore-license | ||
|
||
#ifdef _WIN32 | ||
__declspec(dllexport) | ||
#endif | ||
int foo() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
-include ../tools.mk | ||
|
||
HOST_LIB_DIR=$(TMPDIR)/../../../stage$(RUST_BUILD_STAGE)/lib | ||
|
||
all: | ||
$(RUSTC) foo.rs | ||
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(call RPATH_LINK_SEARCH,$(HOST_LIB_DIR)) -Wl,-rpath,$(TMPDIR) $(EXTRACFLAGS) | ||
all: $(TMPDIR)/$(call BIN,bar) | ||
$(call RUN,bar) | ||
$(call REMOVE_DYLIBS,foo) | ||
$(call FAIL,bar) | ||
|
||
ifdef IS_MSVC | ||
$(TMPDIR)/$(call BIN,bar): $(call DYLIB,foo) | ||
$(CC) bar.c $(TMPDIR)/foo.lib $(call OUT_EXE,bar) | ||
else | ||
$(TMPDIR)/$(call BIN,bar): $(call DYLIB,foo) | ||
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) -L $(TMPDIR) | ||
endif | ||
|
||
$(call DYLIB,foo): foo.rs | ||
$(RUSTC) foo.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
-include ../tools.mk | ||
|
||
all: $(call STATICLIB,cfoo) | ||
all: $(call NATIVE_STATICLIB,cfoo) | ||
$(RUSTC) foo.rs -C prefer-dynamic | ||
$(RUSTC) bar.rs | ||
rm $(TMPDIR)/$(call STATICLIB_GLOB,cfoo) | ||
rm $(call NATIVE_STATICLIB,cfoo) | ||
$(call RUN,bar) | ||
$(call REMOVE_DYLIBS,foo) | ||
$(call FAIL,bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
-include ../tools.mk | ||
|
||
all: $(call STATICLIB,cfoo) | ||
all: $(call NATIVE_STATICLIB,cfoo) | ||
$(RUSTC) foo.rs | ||
$(RUSTC) bar.rs | ||
$(call REMOVE_RLIBS,foo) | ||
rm $(TMPDIR)/$(call STATICLIB_GLOB,cfoo) | ||
rm $(call NATIVE_STATICLIB,cfoo) | ||
$(call RUN,bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) -std=c99 test.c -c -o $(TMPDIR)/test.o | ||
$(AR) rcs $(TMPDIR)/libtest.a $(TMPDIR)/test.o | ||
$(RUSTC) testcrate.rs -L $(TMPDIR) | ||
$(RUSTC) test.rs -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,test) | ||
$(RUSTC) testcrate.rs | ||
$(RUSTC) test.rs | ||
$(call RUN,test) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) -std=c99 test.c -c -o $(TMPDIR)/test.o | ||
$(AR) rcs $(TMPDIR)/libtest.a $(TMPDIR)/test.o | ||
$(RUSTC) test.rs -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,test) | ||
$(RUSTC) test.rs | ||
$(call RUN,test) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) -std=c99 test.c -c -o $(TMPDIR)/test.o | ||
$(AR) rcs $(TMPDIR)/libtest.a $(TMPDIR)/test.o | ||
$(RUSTC) test.rs -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,test) | ||
$(RUSTC) test.rs | ||
$(call RUN,test) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) -std=c99 test.c -c -o $(TMPDIR)/test.o | ||
$(AR) rcs $(TMPDIR)/libtest.a $(TMPDIR)/test.o | ||
$(RUSTC) testcrate.rs -L $(TMPDIR) | ||
$(RUSTC) test.rs -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,test) | ||
$(RUSTC) testcrate.rs | ||
$(RUSTC) test.rs | ||
$(call RUN,test) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
-include ../tools.mk | ||
|
||
all: $(call STATICLIB,foo) | ||
all: $(call NATIVE_STATICLIB,foo) | ||
$(RUSTC) foo.rs | ||
$(RUSTC) bar.rs | ||
$(call RUN,bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
-include ../tools.mk | ||
|
||
all: $(TMPDIR)/libfoo.a | ||
all: $(call NATIVE_STATICLIB,foo) | ||
$(RUSTC) foo.rs -C extra-filename=-383hf8 -C prefer-dynamic | ||
$(RUSTC) bar.rs | ||
$(call RUN,bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
// ignore-license | ||
|
||
#ifdef _WIN32 | ||
__declspec(dllexport) | ||
#endif | ||
void foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) -std=c99 test.c -c -o $(TMPDIR)/test.o | ||
$(AR) rcs $(TMPDIR)/libtest.a $(TMPDIR)/test.o | ||
$(RUSTC) test.rs -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,test) | ||
$(RUSTC) test.rs | ||
$(call RUN,test) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
all: | ||
$(RUSTC) -o "" blank.rs 2>&1 | \ | ||
grep 'No such file or directory' | ||
grep -i 'No such file or directory' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(CC) foo.c -c -o $(TMPDIR)/foo.o | ||
$(AR) rcs $(TMPDIR)/libfoo.a $(TMPDIR)/foo.o | ||
$(RUSTC) bar.rs -lfoo -L $(TMPDIR) | ||
all: $(call NATIVE_STATICLIB,foo) | ||
$(RUSTC) bar.rs | ||
$(call RUN,bar) || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
-include ../tools.mk | ||
|
||
ifdef IS_MSVC | ||
# FIXME(#27979) | ||
all: | ||
else | ||
all: | ||
$(RUSTC) foo.rs | ||
$(RUSTC) bar.rs | ||
$(RUSTC) main.rs | ||
$(call RUN,main) | ||
endif |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.