mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
rewrite lto-linkage-used-attr to rmake
This commit is contained in:
parent
aee3dc4c6c
commit
632f01306b
@ -47,7 +47,6 @@ run-make/link-cfg/Makefile
|
||||
run-make/link-framework/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/macos-deployment-target/Makefile
|
||||
run-make/min-global-align/Makefile
|
||||
run-make/native-link-modifier-bundle/Makefile
|
||||
|
@ -1,8 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
# Verify that the impl_* symbols are preserved. #108030
|
||||
# only-x86_64-unknown-linux-gnu
|
||||
|
||||
all:
|
||||
$(RUSTC) -Cdebuginfo=0 -Copt-level=3 lib.rs
|
||||
$(RUSTC) -Clto=fat -Cdebuginfo=0 -Copt-level=3 main.rs
|
14
tests/run-make/lto-linkage-used-attr/rmake.rs
Normal file
14
tests/run-make/lto-linkage-used-attr/rmake.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Link time optimizations (LTO) used to snip away some important symbols
|
||||
// when setting optimization level to 3 or higher.
|
||||
// This is an LLVM, not a rustc bug, fixed here: https://reviews.llvm.org/D145293
|
||||
// This test checks that the impl_* symbols are preserved as they should.
|
||||
// See https://github.com/rust-lang/rust/issues/108030
|
||||
|
||||
//FIXME(Oneirical): try it on more than only-x86_64-unknown-linux-gnu
|
||||
|
||||
use run_make_support::rustc;
|
||||
|
||||
fn main() {
|
||||
rustc().arg("-Cdebuginfo=0").opt_level("3").input("lib.rs").run();
|
||||
rustc().arg("-Clto=fat").arg("-Cdebuginfo=0").opt_level("3").input("main.rs").run();
|
||||
}
|
Loading…
Reference in New Issue
Block a user