@@ -101,6 +101,7 @@ KNOWN_SETTINGS=(
101
101
darwin-deployment-version-tvos " 9.0" " minimum deployment target version for tvOS"
102
102
darwin-deployment-version-watchos " 2.0" " minimum deployment target version for watchOS"
103
103
darwin-install-extract-symbols " " " whether to extract symbols with dsymutil during installations"
104
+ darwin-install-extract-symbols-use-just-built-dsymutil " 1" " whether we should extract symbols using the just built dsymutil"
104
105
darwin-overlay-target " " " single overlay target to build, dependencies are computed later"
105
106
darwin-sdk-deployment-targets " xctest-ios-8.0" " semicolon-separated list of triples like 'fookit-ios-9.0;barkit-watchos-9.0'"
106
107
darwin-stdlib-install-name-dir " " " the directory of the install_name for standard library dylibs"
@@ -866,6 +867,10 @@ function xcrun_find_tool() {
866
867
xcrun --sdk macosx --toolchain " ${DARWIN_XCRUN_TOOLCHAIN} " --find " $@ "
867
868
}
868
869
870
+ function find_just_built_local_host_llvm_tool() {
871
+ find $( build_directory " ${LOCAL_HOST} " llvm) -name " $1 " -type f -print
872
+ }
873
+
869
874
function not() {
870
875
if [[ ! " $1 " ]] ; then
871
876
echo 1
@@ -2846,14 +2851,21 @@ for host in "${ALL_HOSTS[@]}"; do
2846
2851
(cd " ${CURRENT_INSTALL_DIR} " &&
2847
2852
find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | cpio --insecure -pdm " ${INSTALL_SYMROOT} " )
2848
2853
2854
+ dsymutil_path=
2855
+ if [[ -n " ${DARWIN_INSTALL_EXTRACT_SYMBOLS_USE_JUST_BUILT_DSYMUTIL} " ]]; then
2856
+ dsymutil_path=$( find_just_built_local_host_llvm_tool dsymutil)
2857
+ else
2858
+ dsymutil_path=$( xcrun_find_tool dsymutil)
2859
+ fi
2860
+
2849
2861
# Run dsymutil on executables and shared libraries.
2850
2862
#
2851
2863
# Exclude shell scripts and static archives.
2852
2864
(cd " ${INSTALL_SYMROOT} " &&
2853
2865
find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | \
2854
2866
grep -v ' .py$' | \
2855
2867
grep -v ' .a$' | \
2856
- xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool dsymutil ) )
2868
+ xargs -n 1 -P ${BUILD_JOBS} ${dsymutil_path} )
2857
2869
2858
2870
# Strip executables, shared libraries and static libraries in
2859
2871
# `host_install_destdir`.
0 commit comments