Skip to content

Commit

Permalink
rewrite lto-dylib-dep to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 26, 2024
1 parent a6bb92a commit c6bb357
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ run-make/llvm-ident/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile
run-make/longjmp-across-rust/Makefile
run-make/lto-dylib-dep/Makefile
run-make/lto-linkage-used-attr/Makefile
run-make/lto-no-link-whole-rlib/Makefile
run-make/lto-smoke-c/Makefile
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/lto-dylib-dep/Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions tests/run-make/lto-dylib-dep/rmake.rs
Original file line number Diff line number Diff line change
@@ -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");
}

0 comments on commit c6bb357

Please sign in to comment.