Skip to content

Commit 7069335

Browse files
Auto merge of #148671 - ZuseZ4:offload-bootstrap, r=<try>
Offload bootstrap
2 parents 843f8ce + 861cb3b commit 7069335

File tree

2 files changed

+8
-1
lines changed
  • src
    • bootstrap/src/core/build_steps
    • ci/docker/host-x86_64/dist-x86_64-linux

2 files changed

+8
-1
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,13 @@ impl Step for Llvm {
460460
//FIXME(ZuseZ4): LLVM intends to drop the offload dependency on openmp.
461461
//Remove this line once they achieved it.
462462
enabled_llvm_runtimes.push("openmp");
463-
enabled_llvm_projects.push("compiler-rt");
463+
enabled_llvm_runtimes.push("compiler-rt");
464+
465+
let runtime_targets = vec!["default", "amdgcn-amd-amdhsa", "nvptx64-nvidia-cuda"];
466+
cfg.define("LLVM_RUNTIME_TARGETS", runtime_targets.join(";"));
467+
468+
cfg.define("RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES", "openmp");
469+
cfg.define("RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES", "openmp");
464470
}
465471

466472
if !enabled_llvm_projects.is_empty() {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ ENV RUST_CONFIGURE_ARGS \
9090
--set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
9191
--set llvm.thin-lto=true \
9292
--set llvm.ninja=false \
93+
--set llvm.offload=true \
9394
--set llvm.libzstd=true \
9495
--set rust.jemalloc \
9596
--set rust.bootstrap-override-lld=true \

0 commit comments

Comments
 (0)