Skip to content

Commit f60aec5

Browse files
committed
rewrite lto-no-link-whole-rlib to rmake
1 parent 266d545 commit f60aec5

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ run-make/long-linker-command-lines-cmd-exe/Makefile
7272
run-make/long-linker-command-lines/Makefile
7373
run-make/longjmp-across-rust/Makefile
7474
run-make/lto-linkage-used-attr/Makefile
75-
run-make/lto-no-link-whole-rlib/Makefile
7675
run-make/lto-smoke-c/Makefile
7776
run-make/macos-deployment-target/Makefile
7877
run-make/macos-fat-archive/Makefile

tests/run-make/lto-no-link-whole-rlib/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// In order to improve linking performance, entire rlibs will only be linked if a dylib is being
2+
// created. Otherwise, an executable will only link one rlib as usual. Linking will fail in this
3+
// test should this optimization be reverted.
4+
// See https://github.com/rust-lang/rust/pull/31460
5+
6+
//@ ignore-cross-compile
7+
// Reason: the compiled binary is executed
8+
9+
use run_make_support::{build_native_static_lib, run, rustc};
10+
11+
fn main() {
12+
build_native_static_lib("foo");
13+
build_native_static_lib("bar");
14+
rustc().input("lib1.rs").run();
15+
rustc().input("lib2.rs").run();
16+
rustc().input("main.rs").arg("-Clto").run();
17+
run("main");
18+
}

0 commit comments

Comments
 (0)