Rollup merge of #152908 - bjorn3:dist_profile_remap_debuginfo, r=Kobzol

Enable rust.remap-debuginfo in the dist profile

Anyone who distributes rustc almost certainly wants to enable this option. It is necessary for reproducibility and for a distributed rustc local paths are useless anyway. And finally it improves privacy if you distribute a local build.
This commit is contained in:
Jonathan Brouwer
2026-02-23 20:46:11 +01:00
committed by GitHub
3 changed files with 6 additions and 1 deletions
@@ -24,6 +24,8 @@ channel = "auto-detect"
download-rustc = false
# Build the llvm-bitcode-linker
llvm-bitcode-linker = true
# Required to make builds reproducible.
remap-debuginfo = true
[dist]
# Use better compression when preparing tarballs.
@@ -3416,6 +3416,8 @@ fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
command("./configure")
.arg("--set")
.arg("rust.omit-git-hash=false")
.arg("--set")
.arg("rust.remap-debuginfo=false")
.args(&configure_args)
.arg("--enable-vendor")
.current_dir(plain_src_dir)
+2 -1
View File
@@ -116,7 +116,6 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
else
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp"
fi
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo"
if [ "$DEPLOY_ALT" != "" ] && isLinux; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level=2"
@@ -139,6 +138,8 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
fi
else
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo=false"
# We almost always want debug assertions enabled, but sometimes this takes too
# long for too little benefit, so we just turn them off.
if [ "$NO_DEBUG_ASSERTIONS" = "" ]; then