File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -903,6 +903,12 @@ 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 ! ( "Enzyme must be built with the in-tree LLVM, not one from CI." ) ;
911+ }
906912 builder. require_submodule (
907913 "src/tools/enzyme" ,
908914 Some ( "The Enzyme sources are required for autodiff." ) ,
@@ -970,6 +976,7 @@ impl Step for Enzyme {
970976 . env ( "LLVM_CONFIG_REAL" , & llvm_config)
971977 . define ( "LLVM_ENABLE_ASSERTIONS" , "ON" )
972978 . define ( "ENZYME_EXTERNAL_SHARED_LIB" , "ON" )
979+ // Enzyme must be built against this exact LLVM build — mixing versions breaks compatibility.
973980 . define ( "LLVM_DIR" , builder. llvm_out ( target) ) ;
974981
975982 cfg. build ( ) ;
You can’t perform that action at this time.
0 commit comments