From 03c77865d0345f4a637c70ca92d3f0ddbca6d419 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 19 Dec 2012 01:50:02 +0100 Subject: [PATCH] Fix parallel druntime/Phobos build. --- runtime/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index c7f80afc..39cc92a9 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -384,6 +384,13 @@ macro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix outlist_targ ${DCRT_C} ) + # This is important as a "serialization point" in the build process so + # CMake doesn't invoke the dc()-generated command twice for files linked + # both into the druntime and Phobos libraries at the same time, which + # lead to corrupted library files. It is unclear whether this is really + # a CMake bug or not. + add_dependencies(phobos-ldc${target_suffix} ${lib_targets}) + set_target_properties( phobos-ldc${target_suffix} PROPERTIES VERSION ${DMDFE_VERSION}