File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -903,6 +903,14 @@ impl Step for Enzyme {
903903 ) ,
904904 ) ]
905905 fn run ( 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, not one downloaded from CI.
909+ if builder. config . llvm_from_ci {
910+ panic ! (
911+ "Enzyme must be built with the in-tree LLVM, not one from CI. Set `llvm.download-ci-llvm = false` to allow building Enzyme."
912+ ) ;
913+ }
906914 builder. require_submodule (
907915 "src/tools/enzyme" ,
908916 Some ( "The Enzyme sources are required for autodiff." ) ,
@@ -970,6 +978,7 @@ impl Step for Enzyme {
970978 . env ( "LLVM_CONFIG_REAL" , & llvm_config)
971979 . define ( "LLVM_ENABLE_ASSERTIONS" , "ON" )
972980 . define ( "ENZYME_EXTERNAL_SHARED_LIB" , "ON" )
981+ // Enzyme must be built against this exact LLVM build — mixing versions breaks compatibility.
973982 . define ( "LLVM_DIR" , builder. llvm_out ( target) ) ;
974983
975984 cfg. build ( ) ;
You can’t perform that action at this time.
0 commit comments