@@ -23,7 +23,7 @@ use crate::core::config::{Config, TargetSelection};
2323use crate :: utils:: build_stamp:: { BuildStamp , generate_smart_stamp_hash} ;
2424use crate :: utils:: exec:: command;
2525use crate :: utils:: helpers:: {
26- self , exe, get_clang_cl_resource_dir, libdir , t, unhashed_basename, up_to_date,
26+ self , exe, get_clang_cl_resource_dir, t, unhashed_basename, up_to_date,
2727} ;
2828use crate :: { CLang , GitRepo , Kind , trace} ;
2929
@@ -561,6 +561,7 @@ impl Step for Llvm {
561561 }
562562 } ;
563563
564+ // FIXME(ZuseZ4): Do we need that for Enzyme too?
564565 // When building LLVM with LLVM_LINK_LLVM_DYLIB for macOS, an unversioned
565566 // libLLVM.dylib will be built. However, llvm-config will still look
566567 // for a versioned path like libLLVM-14.dylib. Manually create a symbolic
@@ -1166,7 +1167,7 @@ impl Step for Enzyme {
11661167 let llvm_version_major = llvm:: get_llvm_version_major ( builder, & host_llvm_config) ;
11671168 let lib_ext = std:: env:: consts:: DLL_EXTENSION ;
11681169 let libenzyme = format ! ( "libEnzyme-{llvm_version_major}" ) ;
1169- let build_dir = out_dir. join ( libdir ( target ) ) ;
1170+ let build_dir = out_dir. join ( "lib" ) ;
11701171 let dylib = build_dir. join ( & libenzyme) . with_extension ( lib_ext) ;
11711172
11721173 trace ! ( "checking build stamp to see if we need to rebuild enzyme artifacts" ) ;
@@ -1204,16 +1205,7 @@ impl Step for Enzyme {
12041205 // hard to spot more relevant issues.
12051206 let mut cflags = CcFlags :: default ( ) ;
12061207 cflags. push_all ( "-Wno-deprecated" ) ;
1207-
1208- // Logic copied from `configure_llvm`
1209- // ThinLTO is only available when building with LLVM, enabling LLD is required.
1210- // Apple's linker ld64 supports ThinLTO out of the box though, so don't use LLD on Darwin.
1211- let mut ldflags = LdFlags :: default ( ) ;
1212- if builder. config . llvm_thin_lto && !target. contains ( "apple" ) {
1213- ldflags. push_all ( "-fuse-ld=lld" ) ;
1214- }
1215-
1216- configure_cmake ( builder, target, & mut cfg, true , ldflags, cflags, & [ ] ) ;
1208+ configure_cmake ( builder, target, & mut cfg, true , LdFlags :: default ( ) , cflags, & [ ] ) ;
12171209
12181210 // Re-use the same flags as llvm to control the level of debug information
12191211 // generated by Enzyme.
0 commit comments