Skip to content

Commit f23d0b9

Browse files
committed
move enzyme flags from general cargo to rustc-specific cargo
Signed-off-by: onur-ozkan <[email protected]>
1 parent 60c3673 commit f23d0b9

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: src/bootstrap/src/core/build_steps/compile.rs

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

1060+
if builder.config.llvm_enzyme {
1061+
cargo.rustflag("-l").rustflag("Enzyme-19");
1062+
}
1063+
10601064
// We currently don't support cross-crate LTO in stage0. This also isn't hugely necessary
10611065
// and may just be a time sink.
10621066
if compiler.stage != 0 {

Diff for: src/bootstrap/src/core/builder.rs

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

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

0 commit comments

Comments
 (0)