rewrite lto-no-link-whole-rlib to rmake
This commit is contained in:
parent
01c7118fa9
commit
db8398db6f
@ -52,7 +52,6 @@ run-make/linkage-attr-on-static/Makefile
|
||||
run-make/long-linker-command-lines-cmd-exe/Makefile
|
||||
run-make/long-linker-command-lines/Makefile
|
||||
run-make/lto-linkage-used-attr/Makefile
|
||||
run-make/lto-no-link-whole-rlib/Makefile
|
||||
run-make/macos-deployment-target/Makefile
|
||||
run-make/min-global-align/Makefile
|
||||
run-make/native-link-modifier-bundle/Makefile
|
||||
|
@ -1,9 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,foo) $(call NATIVE_STATICLIB,bar)
|
||||
$(RUSTC) lib1.rs
|
||||
$(RUSTC) lib2.rs
|
||||
$(RUSTC) main.rs -Clto
|
||||
$(call RUN,main)
|
||||
|
18
tests/run-make/lto-no-link-whole-rlib/rmake.rs
Normal file
18
tests/run-make/lto-no-link-whole-rlib/rmake.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// In order to improve linking performance, entire rlibs will only be linked if a dylib is being
|
||||
// created. Otherwise, an executable will only link one rlib as usual. Linking will fail in this
|
||||
// test should this optimization be reverted.
|
||||
// See https://github.com/rust-lang/rust/pull/31460
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("foo");
|
||||
build_native_static_lib("bar");
|
||||
rustc().input("lib1.rs").run();
|
||||
rustc().input("lib2.rs").run();
|
||||
rustc().input("main.rs").arg("-Clto").run();
|
||||
run("main");
|
||||
}
|
Loading…
Reference in New Issue
Block a user