Skip to content

Commit a6e802a

Browse files
Add regression test for #59137.
1 parent ef648f4 commit a6e802a

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-include ../tools.mk
2+
3+
# Test that we don't run into an assertion when using a Rust dylib dependency
4+
# while compiling with full LTO.
5+
# See https://github.com/rust-lang/rust/issues/59137
6+
7+
all:
8+
$(RUSTC) a_dylib.rs --crate-type=dylib -C prefer-dynamic
9+
$(RUSTC) main.rs -C lto
10+
$(call RUN,main)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
pub fn foo() {
3+
println!("bar");
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
extern crate a_dylib;
3+
4+
fn main() {
5+
a_dylib::foo();
6+
}

0 commit comments

Comments
 (0)