Skip to content

Commit 4ebfb2d

Browse files
authored
Rollup merge of rust-lang#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 55725e6 + fb811f8 commit 4ebfb2d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

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/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)