Skip to content

Commit 71b3fd6

Browse files
committed
move llvm_enzyme from rust config to parse_config method
1 parent 60e2264 commit 71b3fd6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ impl Config {
798798
config.apply_install_config(toml.install);
799799
config.apply_gcc_config(toml.gcc);
800800
config.apply_dist_config(toml.dist);
801+
config.apply_llvm_config(toml.llvm);
801802

802803
config.apply_build_config(
803804
toml.build,
@@ -809,7 +810,9 @@ impl Config {
809810
);
810811
config.apply_target_config(toml.target);
811812
config.apply_rust_config(toml.rust, flags_warnings);
812-
config.apply_llvm_config(toml.llvm);
813+
814+
config.llvm_enzyme =
815+
config.llvm_enzyme || config.channel == "dev" || config.channel == "nightly";
813816

814817
if config.llvm_from_ci {
815818
let triple = &config.host_target.triple;

src/bootstrap/src/core/config/toml/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl Config {
206206
self.llvm_allow_old_toolchain = allow_old_toolchain.unwrap_or(false);
207207
self.llvm_offload = offload.unwrap_or(false);
208208
self.llvm_tests = tests.unwrap_or(false);
209-
self.llvm_enzyme = enzyme.unwrap_or(false);
209+
self.llvm_enzyme = enzyme.unwrap_or(self.channel == "dev" || self.channel == "nightly");
210210
self.llvm_plugins = plugins.unwrap_or(false);
211211
self.llvm_polly = polly.unwrap_or(false);
212212
self.llvm_clang = clang.unwrap_or(false);

src/bootstrap/src/core/config/toml/rust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ impl Config {
619619
self.rust_randomize_layout = randomize_layout.unwrap_or_default();
620620
self.llvm_tools_enabled = llvm_tools.unwrap_or(true);
621621

622-
self.llvm_enzyme = self.channel == "dev" || self.channel == "nightly";
623622
self.rustc_default_linker = default_linker;
624623
self.musl_root = musl_root.map(PathBuf::from);
625624
self.save_toolstates = save_toolstates.map(PathBuf::from);

0 commit comments

Comments
 (0)