about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/lto.rs
diff options
context:
space:
mode:
authorJana Dönszelmann <jonathan@donsz.nl>2025-09-17 20:29:36 +0200
committerGitHub <noreply@github.com>2025-09-17 20:29:36 +0200
commit9303a924f446a83909795ab8cac3efa239380477 (patch)
tree6e5f28ec5cdc574e34afaf8e7b2a438252438cb1 /compiler/rustc_codegen_llvm/src/back/lto.rs
parent1c1d5c71e0ab458ba3d3ae215dfa79f8666070c3 (diff)
parent1991779bd4a0a8d8905b6644b06aa317dde353ac (diff)
downloadrust-9303a924f446a83909795ab8cac3efa239380477.tar.gz
rust-9303a924f446a83909795ab8cac3efa239380477.zip
Rollup merge of #146598 - bjorn3:feature_llvm_enzyme, r=davidtwco
Make llvm_enzyme a regular cargo feature

This makes it clearer that it is set by the build system rather than by the rustc that compiles the current rustc. It also avoids bootstrap needing to pass `--check-cfg llvm_enzyme` to rustc.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/lto.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/lto.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs
index f571716d9dd..78107d95e5a 100644
--- a/compiler/rustc_codegen_llvm/src/back/lto.rs
+++ b/compiler/rustc_codegen_llvm/src/back/lto.rs
@@ -617,7 +617,7 @@ pub(crate) fn run_pass_manager(
         crate::builder::gpu_offload::handle_gpu_code(cgcx, &cx);
     }
 
-    if cfg!(llvm_enzyme) && enable_ad && !thin {
+    if cfg!(feature = "llvm_enzyme") && enable_ad && !thin {
         let opt_stage = llvm::OptStage::FatLTO;
         let stage = write::AutodiffStage::PostAD;
         if !config.autodiff.contains(&config::AutoDiff::NoPostopt) {