-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #135162 - pietroalbini:pa-stable, r=pietroalbini
Prepare Rust 1.84.0 stable release Included a backport of #135034, and squashed the release notes. r? `@ghost`
- Loading branch information
Showing
9 changed files
with
409 additions
and
60 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
beta | ||
stable |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
fn main() { | ||
hey_i_get_compiled(); | ||
} | ||
|
||
#[inline(never)] | ||
fn hey_i_get_compiled() { | ||
println!("Hi! Do or do not strip me, your choice."); | ||
} |
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,42 @@ | ||
//@ ignore-windows Windows does not actually strip | ||
|
||
// Test that -Cstrip correctly strips/preserves debuginfo and symbols. | ||
|
||
use run_make_support::{bin_name, is_darwin, llvm_dwarfdump, llvm_nm, rustc}; | ||
|
||
fn main() { | ||
// We use DW_ (the start of any DWARF name) to check that some debuginfo is present. | ||
let dwarf_indicator = "DW_"; | ||
|
||
let test_symbol = "hey_i_get_compiled"; | ||
let binary = &bin_name("hello"); | ||
|
||
// Avoid checking debuginfo on darwin, because it is not actually affected by strip. | ||
// Darwin *never* puts debuginfo in the main binary (-Csplit-debuginfo=off just removes it), | ||
// so we never actually have any debuginfo in there, so we can't check that it's present. | ||
let do_debuginfo_check = !is_darwin(); | ||
|
||
// Additionally, use -Cdebuginfo=2 to make the test independent of the amount of debuginfo | ||
// for std. | ||
|
||
// -Cstrip=none should preserve symbols and debuginfo. | ||
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=none").run(); | ||
llvm_nm().input(binary).run().assert_stdout_contains(test_symbol); | ||
if do_debuginfo_check { | ||
llvm_dwarfdump().input(binary).run().assert_stdout_contains(dwarf_indicator); | ||
} | ||
|
||
// -Cstrip=debuginfo should preserve symbols and strip debuginfo. | ||
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=debuginfo").run(); | ||
llvm_nm().input(binary).run().assert_stdout_contains(test_symbol); | ||
if do_debuginfo_check { | ||
llvm_dwarfdump().input(binary).run().assert_stdout_not_contains(dwarf_indicator); | ||
} | ||
|
||
// -Cstrip=symbols should strip symbols and strip debuginfo. | ||
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=symbols").run(); | ||
llvm_nm().input(binary).run().assert_stderr_not_contains(test_symbol); | ||
if do_debuginfo_check { | ||
llvm_dwarfdump().input(binary).run().assert_stdout_not_contains(dwarf_indicator); | ||
} | ||
} |