@@ -6711,10 +6711,11 @@ fi
67116711 fi
67126712 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
67136713 then
6714- found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6714+ # The Apple-supplied ar in Xcode or the Command Line Tools is apparently sufficient
6715+ found_llvm_ar=`/usr/bin/xcrun -find ar 2>/dev/null`
67156716 if test -n "${found_llvm_ar}"
67166717 then
6717- LLVM_AR='/usr/bin/xcrun llvm- ar'
6718+ LLVM_AR='/usr/bin/xcrun ar'
67186719 LLVM_AR_FOUND=found
67196720 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
67206721$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
@@ -6732,6 +6733,7 @@ $as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
67326733 Darwin*)
67336734 # Any changes made here should be reflected in the GCC+Darwin case below
67346735 LTOFLAGS="-flto -Wl,-export_dynamic"
6736+ LTOCFLAGS="-flto"
67356737 ;;
67366738 *)
67376739 LTOFLAGS="-flto"
@@ -6742,6 +6744,7 @@ $as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
67426744 case $ac_sys_system in
67436745 Darwin*)
67446746 LTOFLAGS="-flto -Wl,-export_dynamic"
6747+ LTOCFLAGS="-flto"
67456748 ;;
67466749 *)
67476750 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
@@ -6757,7 +6760,7 @@ $as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
67576760 LTOFLAGS="$LTOFLAGS -g"
67586761 fi
67596762
6760- CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
6763+ CFLAGS_NODIST="$CFLAGS_NODIST ${LTOCFLAGS-$ LTOFLAGS} "
67616764 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
67626765fi
67636766
0 commit comments