build: honour the libdispatch build type

When configuring libdispatch as part of the swift build on Linux with SourceKit
enabled, we would default to a release build.  However, that results in known
leaks being reported with LSAN when building with a debug standard library.
Pass along the `LIBDISPATCH_BUILD_TYPE` into the CMake build and map that to the
CMAKE_BUILD_TYPE for the project.
This commit is contained in:
Saleem Abdulrasool
2018-08-22 09:30:38 -07:00
committed by Saleem Abdulrasool
parent 06326afb34
commit df208b370c
3 changed files with 3 additions and 0 deletions

View File

@@ -2132,6 +2132,7 @@ for host in "${ALL_HOSTS[@]}"; do
-DSWIFT_EMBED_BITCODE_SECTION:BOOL=$(true_false "${EMBED_BITCODE_SECTION}")
-DSWIFT_TOOLS_ENABLE_LTO:STRING="${SWIFT_TOOLS_ENABLE_LTO}"
-DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=$(true_false "${BUILD_RUNTIME_WITH_HOST_COMPILER}")
-DLIBDISPATCH_CMAKE_BUILD_TYPE:STRING="${LIBDISPATCH_BUILD_TYPE}"
"${swift_cmake_options[@]}"
)