Skip to content

Commit dfa1bdb

Browse files
committed
Attempt to reduce the number of embedded stdlib targets being built simultaneously.
We are seeing strange crashes during embedded stdlib build stage on Ubuntu 24.04. These crashes only seem to occur when we dispatch many stdlib emit-module tasks at the same time. While we root-cause it, this change attempts to slow down the process to only two Embedded StdLib tasks at-a-time. Workaround for rdar://137674862
1 parent 8feb497 commit dfa1bdb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/Platform/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
8383

8484
add_custom_target(embedded-darwin)
8585
add_dependencies(embedded-libraries embedded-darwin)
86+
87+
set_property(GLOBAL APPEND PROPERTY JOB_POOLS one_job=1)
8688
foreach(entry ${EMBEDDED_STDLIB_TARGET_TRIPLES})
8789
string(REGEX REPLACE "[ \t]+" ";" list "${entry}")
8890
list(GET list 0 arch)
@@ -125,6 +127,7 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
125127
INSTALL_IN_COMPONENT stdlib
126128
)
127129
add_dependencies(embedded-darwin embedded-darwin-${mod})
130+
set_property(TARGET embedded-darwin-${mod} PROPERTY JOB_POOL_COMPILE one_job)
128131
endforeach()
129132
endif()
130133

0 commit comments

Comments
 (0)