Skip to content

Commit d35c1d3

Browse files
Auto merge of #148671 - ZuseZ4:offload-bootstrap, r=<try>
Offload bootstrap
2 parents b64df9d + 27afca6 commit d35c1d3

File tree

2 files changed

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

2 files changed

+16
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,24 @@ impl Step for Llvm {
456456
// This is an experimental flag, which likely builds more than necessary.
457457
// We will optimize it when we get closer to releasing it on nightly.
458458
if builder.config.llvm_offload {
459+
//enabled_llvm_projects.push("lld");
459460
enabled_llvm_runtimes.push("offload");
460461
//FIXME(ZuseZ4): LLVM intends to drop the offload dependency on openmp.
461462
//Remove this line once they achieved it.
462-
enabled_llvm_runtimes.push("openmp");
463-
enabled_llvm_projects.push("compiler-rt");
463+
//enabled_llvm_runtimes.push("openmp");
464+
//enabled_llvm_runtimes.push("compiler-rt");
465+
466+
// -DRUNTIMES_CMAKE_ARGS="-DLIBOMPTARGET_PLUGINS_TO_BUILD=amdgpu;nvptx;
467+
//cfg.define("RUNTIMES_CMAKE_ARGS", "-DLIBOMPTARGET_PLUGINS_TO_BUILD=amdgpu;nvptx");
468+
//cfg.define("LLVM_TARGETS_TO_BUILD", "host;AMDGPU;NVPTX");
469+
470+
//let runtime_targets = vec!["default", "amdgcn-amd-amdhsa", "nvptx64-nvidia-cuda"];
471+
//cfg.define("LLVM_RUNTIME_TARGETS", runtime_targets.join(";"));
472+
473+
cfg.define("LLVM_INCLUDE_TESTS", "OFF");
474+
cfg.define("LLVM_BUILD_TESTS", "OFF");
475+
//cfg.define("RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES", "openmp");
476+
//cfg.define("RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES", "openmp");
464477
}
465478

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