Skip to content

Commit

Permalink
move enzyme flags from general cargo to rustc-specific cargo (#180)
Browse files Browse the repository at this point in the history
authored-by onur-ozkan <work@onurozkan.dev>
  • Loading branch information
ZuseZ4 committed Sep 21, 2024
1 parent cfb68c6 commit 36f5855
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,10 @@ pub fn rustc_cargo(
// killed, rather than having an error bubble up and cause a panic.
cargo.rustflag("-Zon-broken-pipe=kill");

if builder.build.config.llvm_enzyme {
cargo.rustflag("-l").rustflag("Enzyme-19");
}

// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
// and may just be a time sink.
if compiler.stage != 0 {
Expand Down
6 changes: 0 additions & 6 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1589,12 +1589,6 @@ impl<'a> Builder<'a> {
rustflags.arg(sysroot_str);
}

// https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20link.20new.20library.20into.20stage1.2Frustc
if self.config.llvm_enzyme {
rustflags.arg("-l");
rustflags.arg("Enzyme-19");
}

let use_new_symbol_mangling = match self.config.rust_new_symbol_mangling {
Some(setting) => {
// If an explicit setting is given, use that
Expand Down

0 comments on commit 36f5855

Please sign in to comment.