about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-09-21 22:34:32 -0700
committerGitHub <noreply@github.com>2024-09-21 22:34:32 -0700
commit959f33ac858bdafc64a4d412896f894d65f70aab (patch)
tree61852ab9fd5955c610358816215e6d906d68a67f
parent6ce376774c0bc46ac8be247bca93ff5a1287a8fc (diff)
parentf23d0b9c9dd42ef9153a8b86eecb0fd2fe62b6db (diff)
downloadrust-959f33ac858bdafc64a4d412896f894d65f70aab.tar.gz
rust-959f33ac858bdafc64a4d412896f894d65f70aab.zip
Rollup merge of #130648 - onur-ozkan:enzyme-linking, r=Kobzol
move enzyme flags from general cargo to rustc-specific cargo

Resolves #130637.
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs4
-rw-r--r--src/bootstrap/src/core/builder.rs6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index e1ab1e7599e..db7b239c0ae 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1057,6 +1057,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.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 {
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index 2124890b94f..d2c23ee8432 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -1592,12 +1592,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