Skip to content

Commit 36f5855

Browse files
authored
move enzyme flags from general cargo to rustc-specific cargo (#180)
authored-by onur-ozkan <[email protected]>
1 parent cfb68c6 commit 36f5855

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,10 @@ pub fn rustc_cargo(
10611061
// killed, rather than having an error bubble up and cause a panic.
10621062
cargo.rustflag("-Zon-broken-pipe=kill");
10631063

1064+
if builder.build.config.llvm_enzyme {
1065+
cargo.rustflag("-l").rustflag("Enzyme-19");
1066+
}
1067+
10641068
// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
10651069
// and may just be a time sink.
10661070
if compiler.stage != 0 {

src/bootstrap/src/core/builder.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1589,12 +1589,6 @@ impl<'a> Builder<'a> {
15891589
rustflags.arg(sysroot_str);
15901590
}
15911591

1592-
// https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20link.20new.20library.20into.20stage1.2Frustc
1593-
if self.config.llvm_enzyme {
1594-
rustflags.arg("-l");
1595-
rustflags.arg("Enzyme-19");
1596-
}
1597-
15981592
let use_new_symbol_mangling = match self.config.rust_new_symbol_mangling {
15991593
Some(setting) => {
16001594
// If an explicit setting is given, use that

0 commit comments

Comments
 (0)