Skip to content

Commit 874a89d

Browse files
committed
Prevent multithreaded linking
1 parent a96285e commit 874a89d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/compilers.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ if (NOT IS_VS6_BUILD)
3636
# Enforce strict __cplusplus version
3737
add_compile_options(/Zc:__cplusplus)
3838
endif()
39+
else()
40+
# Define two pools: 'compile' with plenty of slots, 'link' with just one
41+
set_property(GLOBAL PROPERTY JOB_POOLS compile=8 link=1)
42+
# Tell CMake that all compile steps go into 'compile'
43+
set(CMAKE_JOB_POOL_COMPILE compile)
44+
# and all link steps go into 'link' (so only one link ever runs since vc6 can't handle multithreaded linking)
45+
set(CMAKE_JOB_POOL_LINK link)
3946
endif()
4047

4148
if(RTS_BUILD_OPTION_ASAN)

0 commit comments

Comments
 (0)