Skip to content

Commit e173d63

Browse files
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.
2 parents 1d21fd3 + 262744e commit e173d63

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/bootstrap/defaults/bootstrap.dist.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ channel = "auto-detect"
2424
download-rustc = false
2525
# Build the llvm-bitcode-linker
2626
llvm-bitcode-linker = true
27+
# Required to make builds reproducible.
28+
remap-debuginfo = true
2729

2830
[dist]
2931
# Use better compression when preparing tarballs.

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,8 @@ fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
34163416
command("./configure")
34173417
.arg("--set")
34183418
.arg("rust.omit-git-hash=false")
3419+
.arg("--set")
3420+
.arg("rust.remap-debuginfo=false")
34193421
.args(&configure_args)
34203422
.arg("--enable-vendor")
34213423
.current_dir(plain_src_dir)

src/ci/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
116116
else
117117
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp"
118118
fi
119-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo"
120119

121120
if [ "$DEPLOY_ALT" != "" ] && isLinux; then
122121
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level=2"
@@ -139,6 +138,8 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
139138
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
140139
fi
141140
else
141+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo=false"
142+
142143
# We almost always want debug assertions enabled, but sometimes this takes too
143144
# long for too little benefit, so we just turn them off.
144145
if [ "$NO_DEBUG_ASSERTIONS" = "" ]; then

0 commit comments

Comments
 (0)