Skip to content

Commit 3e8141c

Browse files
committed
Auto merge of #132036 - DianQK:test-131164, r=<try>
Add a test case for #131164 The upstream has already been fixed, but it won't be backported to LLVM 19. r? jieyouxu or compiler try-job: x86_64-gnu-stable
2 parents b131765 + ff00622 commit 3e8141c

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,7 @@
1+
#[no_mangle]
2+
fn foo() {}
3+
4+
#[no_mangle]
5+
fn bar() {}
6+
7+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This test ensures that the “symbol not found” error does not occur
2+
// when the symbols in the `PROVIDE` of the link script can be eliminated.
3+
// This is a regression test for #131164.
4+
5+
//@ needs-rust-lld
6+
//@ only-x86_64-unknown-linux-gnu
7+
8+
use run_make_support::rustc;
9+
10+
fn main() {
11+
rustc().input("main.rs").arg("-Zlinker-features=+lld").link_arg("-Tscript.t").run();
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROVIDE(foo = bar);

0 commit comments

Comments
 (0)