Skip to content

Commit d0f63d4

Browse files
committed
[build] Don't execute dsymutil in parallel
`dsymutil` is already multithreaded and can be memory intensive -- execute it one at a time. Addresses rdar://63892559
1 parent 9ee8cd2 commit d0f63d4

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
@@ -2980,12 +2980,13 @@ for host in "${ALL_HOSTS[@]}"; do
29802980
#
29812981
# Exclude shell scripts and static archives.
29822982
# Exclude swift-api-digester dSYM to reduce debug toolchain size.
2983+
# Run sequentially -- dsymutil is multithreaded and can be memory intensive
29832984
(cd "${host_symroot}" &&
29842985
find ./"${CURRENT_PREFIX}" -perm -0111 -type f -print | \
29852986
grep -v '.py$' | \
29862987
grep -v '.a$' | \
29872988
grep -v 'swift-api-digester' | \
2988-
xargs -n 1 -P ${BUILD_JOBS} ${dsymutil_path})
2989+
xargs -n 1 -P 1 ${dsymutil_path})
29892990

29902991
# Strip executables, shared libraries and static libraries in
29912992
# `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)