Skip to content

Commit 3113558

Browse files
Rollup merge of #130648 - onur-ozkan:enzyme-linking, r=Kobzol
move enzyme flags from general cargo to rustc-specific cargo Resolves #130637.
2 parents 7ac6696 + f23d0b9 commit 3113558

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
@@ -1592,12 +1592,6 @@ impl<'a> Builder<'a> {
15921592
rustflags.arg(sysroot_str);
15931593
}
15941594

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

0 commit comments

Comments
 (0)