@@ -240,6 +240,7 @@ KNOWN_SETTINGS=(
240
240
skip-merge-lipo-cross-compile-tools " " " set to skip running merge-lipo after installing cross-compiled host Swift tools"
241
241
coverage-db " " " If set, coverage database to use when prioritizing testing"
242
242
skip-local-host-install " " " If we are cross-compiling multiple targets, skip an install pass locally if the hosts match"
243
+ enable-extract-symbol-dry-run-test " " " If we are dry-running, still run the extract symbol phase so that we can test it"
243
244
)
244
245
245
246
components=(
@@ -3267,40 +3268,45 @@ for host in "${ALL_HOSTS[@]}"; do
3267
3268
3268
3269
# Copy executables and shared libraries from the `host_install_destdir` to
3269
3270
# INSTALL_SYMROOT and run dsymutil on them.
3270
- (cd " ${CURRENT_INSTALL_DIR} " &&
3271
- find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | \
3272
- filter_paths " ${DARWIN_SYMROOT_PATH_FILTERS} " | \
3273
- cpio --insecure -pdm -v " ${host_symroot} " )
3274
-
3275
- dsymutil_path=
3276
- if [[ -n " ${DARWIN_INSTALL_EXTRACT_SYMBOLS_USE_JUST_BUILT_DSYMUTIL} " ]]; then
3277
- dsymutil_path=$( find_just_built_local_host_llvm_tool dsymutil)
3271
+ if [[ -n " ${DRY_RUN} " ]] && [[ -z " ${ENABLE_EXTRACT_SYMBOL_DRY_RUN_TEST} " ]]; then
3272
+ echo " DRY_RUN! Coping executables and shared libraries from the ` host_install_destdir` to
3273
+ INSTALL_SYMROOT and runing dsymutil on them."
3278
3274
else
3279
- dsymutil_path=$( xcrun_find_tool dsymutil)
3280
- fi
3275
+ (cd " ${CURRENT_INSTALL_DIR} " &&
3276
+ find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | \
3277
+ filter_paths " ${DARWIN_SYMROOT_PATH_FILTERS} " | \
3278
+ cpio --insecure -pdm -v " ${host_symroot} " )
3279
+
3280
+ dsymutil_path=
3281
+ if [[ -n " ${DARWIN_INSTALL_EXTRACT_SYMBOLS_USE_JUST_BUILT_DSYMUTIL} " ]]; then
3282
+ dsymutil_path=$( find_just_built_local_host_llvm_tool dsymutil)
3283
+ else
3284
+ dsymutil_path=$( xcrun_find_tool dsymutil)
3285
+ fi
3281
3286
3282
- # Run dsymutil on executables and shared libraries.
3283
- #
3284
- # Exclude shell scripts and static archives.
3285
- # Tweak carefully the amount of parallelism -- dsymutil can be memory intensive and
3286
- # as such too many instance can exhaust the memory and slow down/panic the machine
3287
- printJSONStartTimestamp dsymutil
3288
- (cd " ${host_symroot} " &&
3289
- find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -not -name " *.a" -not -name " *.py" -print | \
3290
- xargs -n 1 -P ${DSYMUTIL_JOBS} ${dsymutil_path} )
3291
- printJSONEndTimestamp dsymutil
3292
-
3293
- # Strip executables, shared libraries and static libraries in
3294
- # `host_install_destdir`.
3295
- find " ${CURRENT_INSTALL_DIR}${CURRENT_PREFIX} /" \
3296
- ' (' -perm -0111 -or -name " *.a" ' )' -type f -print | \
3297
- xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool strip) -S
3298
-
3299
- # Codesign dylibs after strip tool
3300
- # rdar://45388785
3301
- find " ${CURRENT_INSTALL_DIR}${CURRENT_PREFIX} /" \
3302
- ' (' -name " *.dylib" ' )' -type f -print | \
3303
- xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool codesign) -f -s -
3287
+ # Run dsymutil on executables and shared libraries.
3288
+ #
3289
+ # Exclude shell scripts and static archives.
3290
+ # Tweak carefully the amount of parallelism -- dsymutil can be memory intensive and
3291
+ # as such too many instance can exhaust the memory and slow down/panic the machine
3292
+ printJSONStartTimestamp dsymutil
3293
+ (cd " ${host_symroot} " &&
3294
+ find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -not -name " *.a" -not -name " *.py" -print | \
3295
+ xargs -n 1 -P ${DSYMUTIL_JOBS} ${dsymutil_path} )
3296
+ printJSONEndTimestamp dsymutil
3297
+
3298
+ # Strip executables, shared libraries and static libraries in
3299
+ # `host_install_destdir`.
3300
+ find " ${CURRENT_INSTALL_DIR}${CURRENT_PREFIX} /" \
3301
+ ' (' -perm -0111 -or -name " *.a" ' )' -type f -print | \
3302
+ xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool strip) -S
3303
+
3304
+ # Codesign dylibs after strip tool
3305
+ # rdar://45388785
3306
+ find " ${CURRENT_INSTALL_DIR}${CURRENT_PREFIX} /" \
3307
+ ' (' -name " *.dylib" ' )' -type f -print | \
3308
+ xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool codesign) -f -s -
3309
+ fi
3304
3310
3305
3311
{ set +x; } 2> /dev/null
3306
3312
fi
0 commit comments