forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#132036 - DianQK:test-131164, r=<try>
Add a test case for rust-lang#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
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#[no_mangle] | ||
fn foo() {} | ||
|
||
#[no_mangle] | ||
fn bar() {} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This test ensures that the “symbol not found” error does not occur | ||
// when the symbols in the `PROVIDE` of the link script can be eliminated. | ||
// This is a regression test for #131164. | ||
|
||
//@ needs-rust-lld | ||
//@ only-x86_64-unknown-linux-gnu | ||
|
||
use run_make_support::rustc; | ||
|
||
fn main() { | ||
rustc().input("main.rs").arg("-Zlinker-features=+lld").link_arg("-Tscript.t").run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PROVIDE(foo = bar); |