Skip to content

Commit c6bb357

Browse files
committed
rewrite lto-dylib-dep to rmake
1 parent a6bb92a commit c6bb357

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ run-make/llvm-ident/Makefile
9494
run-make/long-linker-command-lines-cmd-exe/Makefile
9595
run-make/long-linker-command-lines/Makefile
9696
run-make/longjmp-across-rust/Makefile
97-
run-make/lto-dylib-dep/Makefile
9897
run-make/lto-linkage-used-attr/Makefile
9998
run-make/lto-no-link-whole-rlib/Makefile
10099
run-make/lto-smoke-c/Makefile

tests/run-make/lto-dylib-dep/Makefile

-11
This file was deleted.

tests/run-make/lto-dylib-dep/rmake.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Compiling with link-time-optimizations (LTO) would previously run into an internal
2+
// compiler error (ICE) if a dylib was passed as a required library. This was due to a
3+
// misplaced assert! call in the compiler, which is now removed. This test checks that
4+
// this bug does not make a resurgence and that dylib+lto compilation succeeds.
5+
// See https://github.com/rust-lang/rust/issues/59137
6+
7+
//@ ignore-cross-compile
8+
9+
use run_make_support::{run, rustc};
10+
11+
fn main() {
12+
rustc().input("a_dylib.rs").crate_type("dylib").arg("-Cprefer-dynamic").run();
13+
rustc().input("main.rs").arg("-Clto").run();
14+
run("main");
15+
}

0 commit comments

Comments
 (0)