diff options
| author | Oneirical <manchot@videotron.ca> | 2024-06-17 15:14:21 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-06-17 15:14:21 -0400 |
| commit | 10db8c7bc220dd3cbbdc66e95aa270a26bcd8a8f (patch) | |
| tree | 27fef0964ad9d6db9023ed9a7281defbf12fb551 | |
| parent | 11380368dc53d0b2fc3a627408818eff1973ce9a (diff) | |
| download | rust-10db8c7bc220dd3cbbdc66e95aa270a26bcd8a8f.tar.gz rust-10db8c7bc220dd3cbbdc66e95aa270a26bcd8a8f.zip | |
rewrite separate-link to rmake.rs
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 | ||||
| -rw-r--r-- | tests/run-make/separate-link/Makefile | 7 | ||||
| -rw-r--r-- | tests/run-make/separate-link/rmake.rs | 14 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index fdd0be79a4d..47d92dafb61 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -203,7 +203,6 @@ run-make/sanitizer-cdylib-link/Makefile run-make/sanitizer-dylib-link/Makefile run-make/sanitizer-staticlib-link/Makefile run-make/separate-link-fail/Makefile -run-make/separate-link/Makefile run-make/sepcomp-cci-copies/Makefile run-make/sepcomp-inlining/Makefile run-make/sepcomp-separate/Makefile diff --git a/tests/run-make/separate-link/Makefile b/tests/run-make/separate-link/Makefile deleted file mode 100644 index d01158d9f5f..00000000000 --- a/tests/run-make/separate-link/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: - echo 'fn main(){}' | $(RUSTC) -Z no-link - - $(RUSTC) -Z link-only $(TMPDIR)/rust_out.rlink - $(call RUN,rust_out) diff --git a/tests/run-make/separate-link/rmake.rs b/tests/run-make/separate-link/rmake.rs new file mode 100644 index 00000000000..e063a1e5ab7 --- /dev/null +++ b/tests/run-make/separate-link/rmake.rs @@ -0,0 +1,14 @@ +// The compiler flags no-link (and by extension, link-only) used to be broken +// due to changes in encoding/decoding. This was patched, and this test ensures +// that these flags are not broken again, resulting in successful compilation. +// See https://github.com/rust-lang/rust/issues/77857 + +//@ ignore-cross-compile + +use run_make_support::{run, rustc}; + +fn main() { + rustc().stdin(b"fn main(){}").arg("-Zno-link").arg("-").run(); + rustc().arg("-Zlink-only").input("rust_out.rlink").run(); + run("rust_out"); +} |
