Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,12 +1151,18 @@ impl Step for Enzyme {

let LlvmResult { host_llvm_config, llvm_cmake_dir } = builder.ensure(Llvm { target });

// Enzyme links against LLVM. If we update the LLVM submodule libLLVM might get a new
// version number, in which case Enzyme will now fail to find LLVM. By including the LLVM
// hash into the Enzyme hash we force a rebuild of Enzyme when updating LLVM.
let enzyme_hash_input = builder.in_tree_llvm_info.sha().unwrap_or_default().to_owned()
+ builder.enzyme_info.sha().unwrap_or_default();

static STAMP_HASH_MEMO: OnceLock<String> = OnceLock::new();
let smart_stamp_hash = STAMP_HASH_MEMO.get_or_init(|| {
generate_smart_stamp_hash(
builder,
&builder.config.src.join("src/tools/enzyme"),
builder.enzyme_info.sha().unwrap_or_default(),
&enzyme_hash_input,
)
});

Expand Down
Loading