Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9fc6b43

Browse files
committed
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`
2 parents 953a5ca + 6287749 commit 9fc6b43

File tree

9 files changed

+409
-60
lines changed

9 files changed

+409
-60
lines changed

‎.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ jobs:
130130
# which then uses log commands to actually set them.
131131
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
132132

133-
- name: setup upstream remote
134-
run: src/ci/scripts/setup-upstream-remote.sh
135-
136133
- name: ensure the channel matches the target branch
137134
run: src/ci/scripts/verify-channel.sh
138135

‎RELEASES.md

Lines changed: 353 additions & 5 deletions
Large diffs are not rendered by default.

‎compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,14 +1117,14 @@ fn link_natively(
11171117
let stripcmd = "rust-objcopy";
11181118
match (strip, crate_type) {
11191119
(Strip::Debuginfo, _) => {
1120-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-S"))
1120+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("--strip-debug"))
11211121
}
11221122
// Per the manpage, `-x` is the maximum safe strip level for dynamic libraries. (#93988)
11231123
(Strip::Symbols, CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro) => {
11241124
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("-x"))
11251125
}
11261126
(Strip::Symbols, _) => {
1127-
strip_symbols_with_external_utility(sess, stripcmd, out_filename, None)
1127+
strip_symbols_with_external_utility(sess, stripcmd, out_filename, Some("--strip-all"))
11281128
}
11291129
(Strip::None, _) => {}
11301130
}

‎src/build_helper/src/git.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use std::path::{Path, PathBuf};
22
use std::process::{Command, Stdio};
33

4-
use crate::ci::CiEnv;
5-
64
pub struct GitConfig<'a> {
75
pub git_repository: &'a str,
86
pub nightly_branch: &'a str,
@@ -116,8 +114,8 @@ fn git_upstream_merge_base(
116114

117115
/// Searches for the nearest merge commit in the repository that also exists upstream.
118116
///
119-
/// It looks for the most recent commit made by the merge bot by matching the author's email
120-
/// address with the merge bot's email.
117+
/// If it fails to find the upstream remote, it then looks for the most recent commit made
118+
/// by the merge bot by matching the author's email address with the merge bot's email.
121119
pub fn get_closest_merge_commit(
122120
git_dir: Option<&Path>,
123121
config: &GitConfig<'_>,
@@ -129,15 +127,7 @@ pub fn get_closest_merge_commit(
129127
git.current_dir(git_dir);
130128
}
131129

132-
let merge_base = {
133-
if CiEnv::is_ci() {
134-
git_upstream_merge_base(config, git_dir).unwrap()
135-
} else {
136-
// For non-CI environments, ignore rust-lang/rust upstream as it usually gets
137-
// outdated very quickly.
138-
"HEAD".to_string()
139-
}
140-
};
130+
let merge_base = git_upstream_merge_base(config, git_dir).unwrap_or_else(|_| "HEAD".into());
141131

142132
git.args([
143133
"rev-list",

‎src/ci/channel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
beta
1+
stable

‎src/ci/scripts/setup-upstream-remote.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎src/ci/shared.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,3 @@ function releaseChannel {
136136
echo $RUST_CI_OVERRIDE_RELEASE_CHANNEL
137137
fi
138138
}
139-
140-
# Parse values from src/stage0 file by key
141-
function parse_stage0_file_by_key {
142-
local key="1ドル"
143-
local file="$ci_dir/../stage0"
144-
local value=$(awk -F= '{a[1ドル]=2ドル} END {print(a["'$key'"])}' $file)
145-
if [ -z "$value" ]; then
146-
echo "ERROR: Key '$key' not found in '$file'."
147-
exit 1
148-
fi
149-
echo "$value"
150-
}

‎tests/run-make/strip/hello.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
hey_i_get_compiled();
3+
}
4+
5+
#[inline(never)]
6+
fn hey_i_get_compiled() {
7+
println!("Hi! Do or do not strip me, your choice.");
8+
}

‎tests/run-make/strip/rmake.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//@ ignore-windows Windows does not actually strip
2+
3+
// Test that -Cstrip correctly strips/preserves debuginfo and symbols.
4+
5+
use run_make_support::{bin_name, is_darwin, llvm_dwarfdump, llvm_nm, rustc};
6+
7+
fn main() {
8+
// We use DW_ (the start of any DWARF name) to check that some debuginfo is present.
9+
let dwarf_indicator = "DW_";
10+
11+
let test_symbol = "hey_i_get_compiled";
12+
let binary = &bin_name("hello");
13+
14+
// Avoid checking debuginfo on darwin, because it is not actually affected by strip.
15+
// Darwin *never* puts debuginfo in the main binary (-Csplit-debuginfo=off just removes it),
16+
// so we never actually have any debuginfo in there, so we can't check that it's present.
17+
let do_debuginfo_check = !is_darwin();
18+
19+
// Additionally, use -Cdebuginfo=2 to make the test independent of the amount of debuginfo
20+
// for std.
21+
22+
// -Cstrip=none should preserve symbols and debuginfo.
23+
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=none").run();
24+
llvm_nm().input(binary).run().assert_stdout_contains(test_symbol);
25+
if do_debuginfo_check {
26+
llvm_dwarfdump().input(binary).run().assert_stdout_contains(dwarf_indicator);
27+
}
28+
29+
// -Cstrip=debuginfo should preserve symbols and strip debuginfo.
30+
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=debuginfo").run();
31+
llvm_nm().input(binary).run().assert_stdout_contains(test_symbol);
32+
if do_debuginfo_check {
33+
llvm_dwarfdump().input(binary).run().assert_stdout_not_contains(dwarf_indicator);
34+
}
35+
36+
// -Cstrip=symbols should strip symbols and strip debuginfo.
37+
rustc().arg("hello.rs").arg("-Cdebuginfo=2").arg("-Cstrip=symbols").run();
38+
llvm_nm().input(binary).run().assert_stderr_not_contains(test_symbol);
39+
if do_debuginfo_check {
40+
llvm_dwarfdump().input(binary).run().assert_stdout_not_contains(dwarf_indicator);
41+
}
42+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /