diff options
author | James Johnston <JamesJ@motionview3d.com> | 2015-06-18 17:17:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-18 20:29:43 (GMT) |
commit | 078b60f05c9750b79e0efb322fafeddd8450f6c0 (patch) | |
tree | 9f0269d39750c59ee02f51576a1df03f5273237a /Modules/Platform/Windows-Embarcadero.cmake | |
parent | e2e6cb7348dfffddb5d93f679fc8c69fffd3d1dc (diff) | |
download | CMake-078b60f05c9750b79e0efb322fafeddd8450f6c0.zip CMake-078b60f05c9750b79e0efb322fafeddd8450f6c0.tar.gz CMake-078b60f05c9750b79e0efb322fafeddd8450f6c0.tar.bz2 |
Embarcadero: Run at most one linker invocation at a time (#15620)
At least some versions (e.g. C++ Builder 5) of the bcc32 linker are known to
write temporary files with a constant name to the current directory (e.g.
"turboc.$ln"). (This can be verified by using Process Monitor to watch the
file writes that bcc32 / ilink32 / implib make). This causes problems with
some generators that keep a constant current directory and run concurrent
linkers.
For example, the Ninja generator, by default, always has the current directory
set to the top of the build tree - resulting in conflicts between the linkers
that are simultaneously trying to write to "turboc.$ln". Symptoms include
direct errors regarding the "turboc.$ln" file, or later build steps failing due
to corrupted output from previous links that happened to link "successfully."
This is not a problem for the Borland Makefiles generator which does not
run jobs in parallel. For the Ninja generator, work around this problem
by using a link job pool of size 1.
Diffstat (limited to 'Modules/Platform/Windows-Embarcadero.cmake')
-rw-r--r-- | Modules/Platform/Windows-Embarcadero.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 26b3c0c..58ef3ca 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -74,6 +74,12 @@ set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT}) +# The Borland link tool does not support multiple concurrent +# invocations within a single working directory. +if(NOT DEFINED CMAKE_JOB_POOL_LINK) + set(CMAKE_JOB_POOL_LINK BCC32LinkPool) + set_property(GLOBAL APPEND PROPERTY JOB_POOLS BCC32LinkPool=1) +endif() macro(__embarcadero_language lang) set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list |