rewrite lto-smoke to rmake
This commit is contained in:
parent
84b40fc908
commit
d9d013bec0
@ -145,7 +145,6 @@ run-make/lto-linkage-used-attr/Makefile
|
||||
run-make/lto-no-link-whole-rlib/Makefile
|
||||
run-make/lto-readonly-lib/Makefile
|
||||
run-make/lto-smoke-c/Makefile
|
||||
run-make/lto-smoke/Makefile
|
||||
run-make/macos-deployment-target/Makefile
|
||||
run-make/macos-fat-archive/Makefile
|
||||
run-make/manual-crate-name/Makefile
|
||||
|
@ -1,31 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: noparam bool_true bool_false thin fat
|
||||
|
||||
noparam:
|
||||
$(RUSTC) lib.rs
|
||||
$(RUSTC) main.rs -C lto
|
||||
$(call RUN,main)
|
||||
|
||||
bool_true:
|
||||
$(RUSTC) lib.rs
|
||||
$(RUSTC) main.rs -C lto=yes
|
||||
$(call RUN,main)
|
||||
|
||||
|
||||
bool_false:
|
||||
$(RUSTC) lib.rs
|
||||
$(RUSTC) main.rs -C lto=off
|
||||
$(call RUN,main)
|
||||
|
||||
thin:
|
||||
$(RUSTC) lib.rs
|
||||
$(RUSTC) main.rs -C lto=thin
|
||||
$(call RUN,main)
|
||||
|
||||
fat:
|
||||
$(RUSTC) lib.rs
|
||||
$(RUSTC) main.rs -C lto=fat
|
||||
$(call RUN,main)
|
||||
|
13
tests/run-make/lto-smoke/rmake.rs
Normal file
13
tests/run-make/lto-smoke/rmake.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// A simple smoke test to check that link time optimization
|
||||
// (LTO) works as intended, with its various flags turned on.
|
||||
// See https://github.com/rust-lang/rust/issues/10741
|
||||
|
||||
//@ ignore-cross-compile
|
||||
|
||||
fn main() {
|
||||
let lto_flags = ["-Clto", "-Clto=yes", "-Clto=off", "-Clto=thin", "-Clto=fat"];
|
||||
for flag in lto_flags {
|
||||
rustc().input(lib.rs).run();
|
||||
rustc().input(main.rs).arg(flag).run();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user