From 0dd01707d53f4c2806dbaf4ebb81aa31f2771f5d Mon Sep 17 00:00:00 2001 From: Oneirical Date: Thu, 11 Jul 2024 16:00:15 -0400 Subject: [PATCH] rewrite and rename issue-69368 to rmake --- .../tidy/src/allowed_run_make_makefiles.txt | 1 - .../a.rs | 0 .../b.rs | 0 .../c.rs | 0 .../crate-circular-deps-link/rmake.rs | 20 +++++++++++++++++++ tests/run-make/issue-69368/Makefile | 19 ------------------ .../link-eh-frame-terminator/rmake.rs | 5 ++--- 7 files changed, 22 insertions(+), 23 deletions(-) rename tests/run-make/{issue-69368 => crate-circular-deps-link}/a.rs (100%) rename tests/run-make/{issue-69368 => crate-circular-deps-link}/b.rs (100%) rename tests/run-make/{issue-69368 => crate-circular-deps-link}/c.rs (100%) create mode 100644 tests/run-make/crate-circular-deps-link/rmake.rs delete mode 100644 tests/run-make/issue-69368/Makefile diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 9204bf1373210..e7d7b7675a967 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -55,7 +55,6 @@ run-make/issue-26006/Makefile run-make/issue-28595/Makefile run-make/issue-33329/Makefile run-make/issue-36710/Makefile -run-make/issue-69368/Makefile run-make/issue-83045/Makefile run-make/issue-84395-lto-embed-bitcode/Makefile run-make/issue-85019-moved-src-dir/Makefile diff --git a/tests/run-make/issue-69368/a.rs b/tests/run-make/crate-circular-deps-link/a.rs similarity index 100% rename from tests/run-make/issue-69368/a.rs rename to tests/run-make/crate-circular-deps-link/a.rs diff --git a/tests/run-make/issue-69368/b.rs b/tests/run-make/crate-circular-deps-link/b.rs similarity index 100% rename from tests/run-make/issue-69368/b.rs rename to tests/run-make/crate-circular-deps-link/b.rs diff --git a/tests/run-make/issue-69368/c.rs b/tests/run-make/crate-circular-deps-link/c.rs similarity index 100% rename from tests/run-make/issue-69368/c.rs rename to tests/run-make/crate-circular-deps-link/c.rs diff --git a/tests/run-make/crate-circular-deps-link/rmake.rs b/tests/run-make/crate-circular-deps-link/rmake.rs new file mode 100644 index 0000000000000..7cc28ac93e148 --- /dev/null +++ b/tests/run-make/crate-circular-deps-link/rmake.rs @@ -0,0 +1,20 @@ +// Test that previously triggered a linker failure with root cause +// similar to one found in the issue #69368. +// +// The crate that provides oom lang item is missing some other lang +// items. Necessary to prevent the use of start-group / end-group. +// +// The weak lang items are defined in a separate compilation units, +// so that linker could omit them if not used. +// +// The crates that need those weak lang items are dependencies of +// crates that provide them. +// See https://github.com/rust-lang/rust/issues/69371 + +use run_make_support::rustc; + +fn main() { + rustc().input("a.rs").run(); + rustc().input("b.rs").run(); + rustc().input("c.rs").run(); +} diff --git a/tests/run-make/issue-69368/Makefile b/tests/run-make/issue-69368/Makefile deleted file mode 100644 index b1229d1b07fc7..0000000000000 --- a/tests/run-make/issue-69368/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -# Test that previously triggered a linker failure with root cause -# similar to one found in the issue #69368. -# -# The crate that provides oom lang item is missing some other lang -# items. Necessary to prevent the use of start-group / end-group. -# -# The weak lang items are defined in a separate compilation units, -# so that linker could omit them if not used. -# -# The crates that need those weak lang items are dependencies of -# crates that provide them. - -all: - $(RUSTC) a.rs - $(RUSTC) b.rs - $(RUSTC) c.rs diff --git a/tests/run-make/link-eh-frame-terminator/rmake.rs b/tests/run-make/link-eh-frame-terminator/rmake.rs index 750d068ac98cf..7ebad96145b78 100644 --- a/tests/run-make/link-eh-frame-terminator/rmake.rs +++ b/tests/run-make/link-eh-frame-terminator/rmake.rs @@ -5,16 +5,15 @@ // See https://github.com/rust-lang/rust/issues/47551 //FIXME(Oneirical): See if it works on anything other than only linux and 64 bit -// maybe riscv64gc-unknown-linux-gnu -use run_make_support::{llvm_objdump, run, rustc}; +use run_make_support::{bin_name, llvm_objdump, run, rustc}; fn main() { rustc().input("eh_frame-terminator.rs").run(); run("eh_frame-terminator").assert_stdout_contains("1122334455667788"); llvm_objdump() .arg("--dwarf=frames") - .input("eh_frame-terminator") + .input(bin_name("eh_frame-terminator")) .run() .assert_stdout_contains("ZERO terminator"); }