Skip to content

Commit 58763c9

Browse files
authored
Merge pull request #4861 from vedantk/modules
build-script: Disable llvm module builds when asan is enabled
2 parents be62491 + 61af28b commit 58763c9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

utils/build-script-impl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,17 @@ function is_swift_lto_enabled() {
328328
fi
329329
}
330330

331+
# Enable module-builds of llvm only when asan is disabled.
332+
# FIXME: rdar://problem/28356072
333+
function is_llvm_module_build_enabled() {
334+
if [[ "$(true_false ${LLVM_ENABLE_MODULES})" == "TRUE" ]] &&
335+
[[ "$(true_false ${ENABLE_ASAN})" == "FALSE" ]]; then
336+
echo "TRUE"
337+
else
338+
echo "FALSE"
339+
fi
340+
}
341+
331342
# Support for performing isolated actions.
332343
#
333344
# This is part of refactoring more work to be done or controllable via
@@ -636,7 +647,7 @@ function set_build_options_for_host() {
636647
-DCOMPILER_RT_ENABLE_WATCHOS:BOOL=FALSE
637648
-DCOMPILER_RT_ENABLE_TVOS:BOOL=FALSE
638649
-DSANITIZER_MIN_OSX_VERSION="${cmake_osx_deployment_target}"
639-
-DLLVM_ENABLE_MODULES:BOOL="$(true_false ${LLVM_ENABLE_MODULES})"
650+
-DLLVM_ENABLE_MODULES:BOOL="$(is_llvm_module_build_enabled)"
640651
)
641652
if [[ $(is_llvm_lto_enabled) == "TRUE" ]]; then
642653
if [[ $(cmake_needs_to_specify_standard_computed_defaults) == "TRUE" ]]; then

0 commit comments

Comments
 (0)