rewrite lto-dylib-dep to rmake
This commit is contained in:
parent
a6bb92ada7
commit
c6bb357502
@ -94,7 +94,6 @@ run-make/llvm-ident/Makefile
|
|||||||
run-make/long-linker-command-lines-cmd-exe/Makefile
|
run-make/long-linker-command-lines-cmd-exe/Makefile
|
||||||
run-make/long-linker-command-lines/Makefile
|
run-make/long-linker-command-lines/Makefile
|
||||||
run-make/longjmp-across-rust/Makefile
|
run-make/longjmp-across-rust/Makefile
|
||||||
run-make/lto-dylib-dep/Makefile
|
|
||||||
run-make/lto-linkage-used-attr/Makefile
|
run-make/lto-linkage-used-attr/Makefile
|
||||||
run-make/lto-no-link-whole-rlib/Makefile
|
run-make/lto-no-link-whole-rlib/Makefile
|
||||||
run-make/lto-smoke-c/Makefile
|
run-make/lto-smoke-c/Makefile
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
# ignore-cross-compile
|
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
# Test that we don't run into an assertion when using a Rust dylib dependency
|
|
||||||
# while compiling with full LTO.
|
|
||||||
# See https://github.com/rust-lang/rust/issues/59137
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(RUSTC) a_dylib.rs --crate-type=dylib -C prefer-dynamic
|
|
||||||
$(RUSTC) main.rs -C lto
|
|
||||||
$(call RUN,main)
|
|
15
tests/run-make/lto-dylib-dep/rmake.rs
Normal file
15
tests/run-make/lto-dylib-dep/rmake.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Compiling with link-time-optimizations (LTO) would previously run into an internal
|
||||||
|
// compiler error (ICE) if a dylib was passed as a required library. This was due to a
|
||||||
|
// misplaced assert! call in the compiler, which is now removed. This test checks that
|
||||||
|
// this bug does not make a resurgence and that dylib+lto compilation succeeds.
|
||||||
|
// See https://github.com/rust-lang/rust/issues/59137
|
||||||
|
|
||||||
|
//@ ignore-cross-compile
|
||||||
|
|
||||||
|
use run_make_support::{run, rustc};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
rustc().input("a_dylib.rs").crate_type("dylib").arg("-Cprefer-dynamic").run();
|
||||||
|
rustc().input("main.rs").arg("-Clto").run();
|
||||||
|
run("main");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user