Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit db8398d

Browse files
committed
rewrite lto-no-link-whole-rlib to rmake
1 parent 01c7118 commit db8398d

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ run-make/linkage-attr-on-static/Makefile
5252
run-make/long-linker-command-lines-cmd-exe/Makefile
5353
run-make/long-linker-command-lines/Makefile
5454
run-make/lto-linkage-used-attr/Makefile
55-
run-make/lto-no-link-whole-rlib/Makefile
5655
run-make/macos-deployment-target/Makefile
5756
run-make/min-global-align/Makefile
5857
run-make/native-link-modifier-bundle/Makefile

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

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
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)