You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/bootstrap/src/core/build_steps/llvm.rs
+9
Original file line number
Diff line number
Diff line change
@@ -903,6 +903,14 @@ impl Step for Enzyme {
903
903
),
904
904
)]
905
905
fnrun(self,builder:&Builder<'_>) -> PathBuf{
906
+
// FIXME: This can be removed once we start shipping the CMake files needed by Enzyme
907
+
// to build against a standalone LLVM binary.
908
+
// For now, Enzyme must be built with the in-tree LLVM and shared LLVM (`llvm.link-shared = true`), not one downloaded from CI.
909
+
if builder.config.llvm_from_ci || !builder.config.llvm_link_shared(){
910
+
panic!(
911
+
"Enzyme must be built with an in-tree LLVM and requires `llvm.link-shared = true`.Set `llvm.download-ci-llvm = false` and `llvm.link-shared = true` to build Enzyme."
912
+
);
913
+
}
906
914
builder.require_submodule(
907
915
"src/tools/enzyme",
908
916
Some("The Enzyme sources are required for autodiff."),
@@ -970,6 +978,7 @@ impl Step for Enzyme {
970
978
.env("LLVM_CONFIG_REAL",&llvm_config)
971
979
.define("LLVM_ENABLE_ASSERTIONS","ON")
972
980
.define("ENZYME_EXTERNAL_SHARED_LIB","ON")
981
+
// Enzyme must be built against this exact LLVM build — mixing versions breaks compatibility.
0 commit comments