Skip to content

Commit 475aec1

Browse files
committed
Auto merge of rust-lang#99442 - Kobzol:revert-99062-lld-icf, r=Mark-Simulacrum
Revert "Use ICF (identical code folding) for building rustc" Reverts rust-lang#99062 Fixes: rust-lang#99440
2 parents f858854 + 45575d2 commit 475aec1

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

src/bootstrap/compile.rs

-6
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,6 @@ impl Step for Rustc {
651651
panic!("Cannot use and generate PGO profiles at the same time");
652652
}
653653

654-
// With LLD, we can use ICF (identical code folding) to reduce the executable size
655-
// of librustc_driver/rustc and to improve i-cache utilization.
656-
if builder.config.use_lld {
657-
cargo.rustflag("-Clink-args=-Wl,--icf=all");
658-
}
659-
660654
let is_collecting = if let Some(path) = &builder.config.rust_profile_generate {
661655
if compiler.stage == 1 {
662656
cargo.rustflag(&format!("-Cprofile-generate={}", path));

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ ENV RUST_CONFIGURE_ARGS \
122122
--set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
123123
--set llvm.thin-lto=true \
124124
--set llvm.ninja=false \
125-
--set rust.jemalloc \
126-
--set rust.use-lld=true
125+
--set rust.jemalloc
127126
ENV SCRIPT ../src/ci/pgo.sh python3 ../x.py dist \
128127
--host $HOSTS --target $HOSTS \
129128
--include-default-paths \

src/ci/pgo.sh

-4
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,3 @@ rm -r $BUILD_ARTIFACTS/llvm $BUILD_ARTIFACTS/lld
195195
$@ \
196196
--rust-profile-use=${RUSTC_PROFILE_MERGED_FILE} \
197197
--llvm-profile-use=${LLVM_PROFILE_MERGED_FILE}
198-
199-
echo "Rustc binary size"
200-
ls -la ./build/$PGO_HOST/stage2/bin
201-
ls -la ./build/$PGO_HOST/stage2/lib

0 commit comments

Comments
 (0)