Skip to content

Commit e668803

Browse files
committed
update offload build steps
1 parent 9606412 commit e668803

File tree

1 file changed

+7
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-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() {

0 commit comments

Comments
 (0)