Skip to content

Commit 2d41efe

Browse files
committed
[Build] Don't configure LLDB with tests enabled if the tests will be skipped
Currently the `--skip-test-lldb` flag will only skip *running* the tests. But we still pass `LLDB_INCLUDE_TESTS` to CMake when configuring LLDB. Since swiftlang#66018 configuring LLDB tests will now always require libcxx to be built. For some presets (e.g., `buildbot_osx_package`) we don't need to build libcxx and we explicitly pass `--skip-test-lldb`; this means if we were to try configure LLDB tests we would hard error. The proposed solution is to check whether the user wants to skip LLDB tests, and if so, set `LLDB_INCLUDE_TESTS=FALSE`. rdar://109774179
1 parent d685c1c commit 2d41efe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: utils/build-script-impl

+7-1
Original file line numberDiff line numberDiff line change
@@ -2187,6 +2187,12 @@ for host in "${ALL_HOSTS[@]}"; do
21872187
DOTEST_ARGS="${DOTEST_ARGS};-E;${DOTEST_EXTRA}"
21882188
fi
21892189

2190+
if [[ "${SKIP_TEST_LLDB}" ]]; then
2191+
should_configure_tests="FALSE"
2192+
else
2193+
should_configure_tests=$(false_true ${BUILD_TOOLCHAIN_ONLY})
2194+
fi
2195+
21902196
cmake_options=(
21912197
"${cmake_options[@]}"
21922198
-C${LLDB_SOURCE_DIR}/cmake/caches/${cmake_cache}
@@ -2205,7 +2211,7 @@ for host in "${ALL_HOSTS[@]}"; do
22052211
-DLLDB_ENABLE_PYTHON=ON
22062212
-DLLDB_ENABLE_LZMA=OFF
22072213
-DLLDB_ENABLE_LUA=OFF
2208-
-DLLDB_INCLUDE_TESTS:BOOL=$(false_true ${BUILD_TOOLCHAIN_ONLY})
2214+
-DLLDB_INCLUDE_TESTS:BOOL="${should_configure_tests}"
22092215
-DLLDB_TEST_LIBCXX_ROOT_DIR:STRING="${libcxx_build_dir}"
22102216
-DLLDB_TEST_USER_ARGS="${DOTEST_ARGS}"
22112217
)

0 commit comments

Comments
 (0)