Skip to content

Commit 96ffb66

Browse files
committed
rewrite no-duplicate-libs to rmake
1 parent fbc869b commit 96ffb66

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ run-make/native-link-modifier-bundle/Makefile
6363
run-make/native-link-modifier-whole-archive/Makefile
6464
run-make/no-alloc-shim/Makefile
6565
run-make/no-builtins-attribute/Makefile
66-
run-make/no-duplicate-libs/Makefile
6766
run-make/panic-abort-eh_frame/Makefile
6867
run-make/pass-non-c-like-enum-to-c/Makefile
6968
run-make/pdb-buildinfo-cl-cmd/Makefile

tests/run-make/no-duplicate-libs/Makefile

-11
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// The rust compiler used to try to detect duplicated libraries in
2+
// the linking order and remove the duplicates... but certain edge cases,
3+
// such as the one presented in `foo` and `bar` in this test, demand precise
4+
// control over the link order, including duplicates. As the anti-duplication
5+
// filter was removed, this test should now successfully see main be compiled
6+
// and executed.
7+
// See https://github.com/rust-lang/rust/pull/12688
8+
9+
//@ ignore-cross-compile
10+
// Reason: the compiled binary is executed
11+
12+
// FIXME(Oneirical): try on msvc because of #27979
13+
14+
use run_make_support::{build_native_static_lib, run, rustc};
15+
16+
fn main() {
17+
build_native_static_lib("foo");
18+
build_native_static_lib("bar");
19+
rustc().input("main.rs").run();
20+
run("main");
21+
}

0 commit comments

Comments
 (0)