@@ -2034,24 +2034,22 @@ impl Step for Assemble {
20342034 let mut build_compiler = builder. compiler ( target_compiler. stage - 1 , builder. config . build ) ;
20352035
20362036 // Build enzyme
2037- if builder. config . llvm_enzyme {
2038- if !builder. config . dry_run ( ) {
2039- debug ! ( "`llvm_enzyme` requested" ) ;
2040- let enzyme_install = builder. ensure ( llvm:: Enzyme { target : build_compiler. host } ) ;
2041- let llvm_config = builder. llvm_config ( builder. config . build ) . unwrap ( ) ;
2042- let llvm_version_major = llvm:: get_llvm_version_major ( builder, & llvm_config) ;
2043- let lib_ext = std:: env:: consts:: DLL_EXTENSION ;
2044- let libenzyme = format ! ( "libEnzyme-{llvm_version_major}" ) ;
2045- let src_lib =
2046- enzyme_install. join ( "build/Enzyme" ) . join ( & libenzyme) . with_extension ( lib_ext) ;
2047- let libdir = builder. sysroot_target_libdir ( build_compiler, build_compiler. host ) ;
2048- let target_libdir =
2049- builder. sysroot_target_libdir ( target_compiler, target_compiler. host ) ;
2050- let dst_lib = libdir. join ( & libenzyme) . with_extension ( lib_ext) ;
2051- let target_dst_lib = target_libdir. join ( & libenzyme) . with_extension ( lib_ext) ;
2052- builder. copy_link ( & src_lib, & dst_lib) ;
2053- builder. copy_link ( & src_lib, & target_dst_lib) ;
2054- }
2037+ if builder. config . llvm_enzyme && !builder. config . dry_run ( ) {
2038+ debug ! ( "`llvm_enzyme` requested" ) ;
2039+ let enzyme_install = builder. ensure ( llvm:: Enzyme { target : build_compiler. host } ) ;
2040+ let llvm_config = builder. llvm_config ( builder. config . build ) . unwrap ( ) ;
2041+ let llvm_version_major = llvm:: get_llvm_version_major ( builder, & llvm_config) ;
2042+ let lib_ext = std:: env:: consts:: DLL_EXTENSION ;
2043+ let libenzyme = format ! ( "libEnzyme-{llvm_version_major}" ) ;
2044+ let src_lib =
2045+ enzyme_install. join ( "build/Enzyme" ) . join ( & libenzyme) . with_extension ( lib_ext) ;
2046+ let libdir = builder. sysroot_target_libdir ( build_compiler, build_compiler. host ) ;
2047+ let target_libdir =
2048+ builder. sysroot_target_libdir ( target_compiler, target_compiler. host ) ;
2049+ let dst_lib = libdir. join ( & libenzyme) . with_extension ( lib_ext) ;
2050+ let target_dst_lib = target_libdir. join ( & libenzyme) . with_extension ( lib_ext) ;
2051+ builder. copy_link ( & src_lib, & dst_lib) ;
2052+ builder. copy_link ( & src_lib, & target_dst_lib) ;
20552053 }
20562054
20572055 // Build the libraries for this compiler to link to (i.e., the libraries
0 commit comments