forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#130156 - nebulark:test_buildinfo, r=jieyouxu Add test for S_OBJNAME & update test for LF_BUILDINFO cl and cmd Update the unit test for checking cl and cmd in LF_BUILDINFO. With llvm-pdbutil we can now more specifically check if the string appears at the right location instead of just checking whether the string exists at all. Context: rust-lang#96475
- Loading branch information
Showing
5 changed files
with
36 additions
and
19 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
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,4 @@ | ||
CHECK: LF_BUILDINFO | ||
CHECK: rustc.exe | ||
CHECK: main.rs | ||
CHECK: "-g" "--crate-name" "my_crate_name" "--crate-type" "bin" "-Cmetadata=dc9ef878b0a48666" |
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
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 @@ | ||
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,20 @@ | ||
// Check if the pdb file contains an S_OBJNAME entry with the name of the .o file | ||
|
||
// This is because it used to be missing in #96475. | ||
// See https://github.com/rust-lang/rust/pull/115704 | ||
|
||
//@ only-windows-msvc | ||
// Reason: pdb files are unique to this architecture | ||
|
||
use run_make_support::{llvm, rustc}; | ||
|
||
fn main() { | ||
rustc().input("main.rs").arg("-g").crate_name("my_great_crate_name").crate_type("bin").run(); | ||
|
||
let pdbutil_result = llvm::llvm_pdbutil() | ||
.arg("dump") | ||
.arg("-symbols") | ||
.input("my_great_crate_name.pdb") | ||
.run() | ||
.assert_stdout_contains_regex("S_OBJNAME.+my_great_crate_name.*\\.o"); | ||
} |