Skip to content

Commit f307287

Browse files
committed
rewrite no-duplicate-libs to rmake
1 parent 632f013 commit f307287

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
@@ -53,7 +53,6 @@ run-make/native-link-modifier-bundle/Makefile
5353
run-make/native-link-modifier-whole-archive/Makefile
5454
run-make/no-alloc-shim/Makefile
5555
run-make/no-builtins-attribute/Makefile
56-
run-make/no-duplicate-libs/Makefile
5756
run-make/panic-abort-eh_frame/Makefile
5857
run-make/pdb-buildinfo-cl-cmd/Makefile
5958
run-make/pgo-gen-lto/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)