Skip to content

Commit e1a4d2a

Browse files
committed
move llvm_enzyme out of rust config, so that llvm_config initialization is preferred
1 parent d7c77e8 commit e1a4d2a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,9 +795,14 @@ impl Config {
795795
.collect::<Vec<PathBuf>>(),
796796
);
797797

798+
// Though we are applying it here, but the enzyme from llvm should get preference.
799+
config.llvm_enzyme =
800+
config.llvm_enzyme || config.channel == "dev" || config.channel == "nightly";
801+
798802
config.apply_install_config(toml.install);
799803
config.apply_gcc_config(toml.gcc);
800804
config.apply_dist_config(toml.dist);
805+
config.apply_llvm_config(toml.llvm);
801806

802807
config.apply_build_config(
803808
toml.build,
@@ -809,7 +814,6 @@ impl Config {
809814
);
810815
config.apply_target_config(toml.target);
811816
config.apply_rust_config(toml.rust, flags_warnings);
812-
config.apply_llvm_config(toml.llvm);
813817

814818
if config.llvm_from_ci {
815819
let triple = &config.host_target.triple;

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)