Skip to content

Commit 102d638

Browse files
authored
[build] Don't execute dsymutil in parallel (#33654)
`dsymutil` is already multithreaded and can be memory intensive -- execute it one at a time. Addresses rdar://63892559
1 parent 1fec2b5 commit 102d638

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

utils/build-script-impl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2978,12 +2978,13 @@ for host in "${ALL_HOSTS[@]}"; do
29782978
#
29792979
# Exclude shell scripts and static archives.
29802980
# Exclude swift-api-digester dSYM to reduce debug toolchain size.
2981+
# Run sequentially -- dsymutil is multithreaded and can be memory intensive
29812982
(cd "${host_symroot}" &&
29822983
find ./"${CURRENT_PREFIX}" -perm -0111 -type f -print | \
29832984
grep -v '.py$' | \
29842985
grep -v '.a$' | \
29852986
grep -v 'swift-api-digester' | \
2986-
xargs -n 1 -P ${BUILD_JOBS} ${dsymutil_path})
2987+
xargs -n 1 -P 1 ${dsymutil_path})
29872988

29882989
# Strip executables, shared libraries and static libraries in
29892990
# `host_install_destdir`.

utils/parser-lib/darwin-extract-symbols

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function xcrun_find_tool() {
4646
# Run dsymutil on executables and shared libraries.
4747
#
4848
# Exclude shell scripts.
49+
# Run sequentially -- dsymutil is multithreaded and can be memory intensive
4950
(cd "${INSTALL_SYMROOT}" &&
5051
find ./"${INSTALL_PREFIX}" -perm -0111 -type f -print | \
5152
grep -v crashlog.py | \
5253
grep -v symbolication.py | \
53-
xargs -n 1 -P ${BUILD_JOBS} $(xcrun_find_tool dsymutil))
54+
xargs -n 1 -P 1 $(xcrun_find_tool dsymutil))
5455

5556
# Strip executables, shared libraries and static libraries in INSTALL_DIR.
5657
find "${INSTALL_DIR}${INSTALL_PREFIX}/" \

0 commit comments

Comments
 (0)