about summary refs log tree commit diff
path: root/scripts/test_bootstrap.sh
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-09 13:48:06 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-09 13:48:06 +0000
commitdf983ce470e58584dcb9f3657d78ae74f77f1a90 (patch)
tree4946c71ac09f572639ea54afcaad5deb9d4c1c3e /scripts/test_bootstrap.sh
parent00354ddaa69a9e4f67efa626cd1488efb03db1ba (diff)
Merge commit '1fa693ca4462fc1f790693464cf765ad693616af' into sync_cg_clif-2024-11-09
Diffstat (limited to 'scripts/test_bootstrap.sh')
-rwxr-xr-xscripts/test_bootstrap.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/test_bootstrap.sh b/scripts/test_bootstrap.sh
index 791d457993d..770f2b6df6c 100755
--- a/scripts/test_bootstrap.sh
+++ b/scripts/test_bootstrap.sh
@@ -11,5 +11,22 @@ rm -r compiler/rustc_codegen_cranelift/{Cargo.*,src}
 cp ../Cargo.* compiler/rustc_codegen_cranelift/
 cp -r ../src compiler/rustc_codegen_cranelift/src
 
+# FIXME(rust-lang/rust#132719) remove once it doesn't break without this patch
+cat <<EOF | git apply -
+diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
+index 3394f2a84a0..cb980dd4d7c 100644
+--- a/src/bootstrap/src/core/build_steps/compile.rs
++++ b/src/bootstrap/src/core/build_steps/compile.rs
+@@ -1976,7 +1976,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
+             }
+         }
+
+-        {
++        if builder.config.llvm_enabled(target_compiler.host) && builder.config.llvm_tools_enabled {
+             // \`llvm-strip\` is used by rustc, which is actually just a symlink to \`llvm-objcopy\`,
+             // so copy and rename \`llvm-objcopy\`.
+             let src_exe = exe("llvm-objcopy", target_compiler.host);
+EOF
+
 ./x.py build --stage 1 library/std
 popd