diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 5cb580e9f79..bc3da81fa52 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -53,7 +53,6 @@ run-make/native-link-modifier-bundle/Makefile run-make/native-link-modifier-whole-archive/Makefile run-make/no-alloc-shim/Makefile run-make/no-builtins-attribute/Makefile -run-make/no-duplicate-libs/Makefile run-make/panic-abort-eh_frame/Makefile run-make/pdb-buildinfo-cl-cmd/Makefile run-make/pgo-gen-lto/Makefile diff --git a/tests/run-make/no-duplicate-libs/Makefile b/tests/run-make/no-duplicate-libs/Makefile deleted file mode 100644 index 4be8c026294..00000000000 --- a/tests/run-make/no-duplicate-libs/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -ifdef IS_MSVC -# FIXME(#27979) -all: -else -all: $(call STATICLIB,foo) $(call STATICLIB,bar) - $(RUSTC) main.rs - $(call RUN,main) -endif diff --git a/tests/run-make/no-duplicate-libs/rmake.rs b/tests/run-make/no-duplicate-libs/rmake.rs new file mode 100644 index 00000000000..35b1234ef34 --- /dev/null +++ b/tests/run-make/no-duplicate-libs/rmake.rs @@ -0,0 +1,21 @@ +// The rust compiler used to try to detect duplicated libraries in +// the linking order and remove the duplicates... but certain edge cases, +// such as the one presented in `foo` and `bar` in this test, demand precise +// control over the link order, including duplicates. As the anti-duplication +// filter was removed, this test should now successfully see main be compiled +// and executed. +// See https://github.com/rust-lang/rust/pull/12688 + +//@ ignore-cross-compile +// Reason: the compiled binary is executed + +// FIXME(Oneirical): try on msvc because of #27979 + +use run_make_support::{build_native_static_lib, run, rustc}; + +fn main() { + build_native_static_lib("foo"); + build_native_static_lib("bar"); + rustc().input("main.rs").run(); + run("main"); +}