File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,14 @@ fn main() {
402402 continue ;
403403 }
404404
405+ let name =
406+ if target. contains ( "apple-darwin" ) && llvm_kind == "dylib" && name. starts_with ( "LLVM-" )
407+ {
408+ "LLVM"
409+ } else {
410+ name
411+ } ;
412+
405413 let kind = if name. starts_with ( "LLVM" ) {
406414 llvm_kind
407415 } else if is_static {
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ pub fn walk_native_lib_search_dirs<R>(
5757 f ( & sess. target_tlib_path . dir . join ( "self-contained" ) , false ) ?;
5858 }
5959
60+ let has_shared_llvm_apple_darwin =
61+ sess. target . is_like_darwin && sess. target_tlib_path . dir . join ( "libLLVM.dylib" ) . exists ( ) ;
62+
6063 // Toolchains for some targets may ship `libunwind.a`, but place it into the main sysroot
6164 // library directory instead of the self-contained directories.
6265 // Sanitizer libraries have the same issue and are also linked by name on Apple targets.
@@ -72,7 +75,8 @@ pub fn walk_native_lib_search_dirs<R>(
7275 || sess. target . os == Os :: Linux
7376 || sess. target . os == Os :: Fuchsia
7477 || sess. target . is_like_aix
75- || sess. target . is_like_darwin && !sess. sanitizers ( ) . is_empty ( )
78+ || sess. target . is_like_darwin
79+ && ( !sess. sanitizers ( ) . is_empty ( ) || has_shared_llvm_apple_darwin)
7680 || sess. target . os == Os :: Windows
7781 && sess. target . env == Env :: Gnu
7882 && sess. target . abi == Abi :: Llvm
Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ auto:
484484 - name : dist-aarch64-apple
485485 env :
486486 SCRIPT : >-
487- ./x.py dist bootstrap
487+ ./x.py dist bootstrap enzyme
488488 --include-default-paths
489489 --host=aarch64-apple-darwin
490490 --target=aarch64-apple-darwin
@@ -493,6 +493,7 @@ auto:
493493 --enable-sanitizers
494494 --enable-profiler
495495 --set rust.jemalloc
496+ --set llvm.link-shared=true
496497 --set rust.lto=thin
497498 --set rust.codegen-units=1
498499 # Aarch64 tooling only needs to support macOS 11.0 and up as nothing else
You can’t perform that action at this time.
0 commit comments