Skip to content

Commit 2119d4d

Browse files
committed
[Build] Make sure lldb API tests run against newly built libcxx
Currently any buildbot that runs LLDB API tests does so against the system SDK. However, we explicitly need users to run the tests against a newly built libcxx. We recently added a new `LLDB_TEST_LIBCXX_ROOT_DIR` CMake variable to LLDB to allow standalone builds to point their tests to a custom libcxx directory. This patch makes sure the relevant LLDB presets build libcxx and then sets above CMake variable. (cherry picked from commit 0c974e0)
1 parent 570c364 commit 2119d4d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

utils/build-presets.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ skip-test-watchos-host
291291

292292
# This is a mixin preset which builds and smoke-tests lldb.
293293
[preset: lldb-smoketest,tools=RA]
294+
# Build libcxx for tests
295+
libcxx
294296
# Build LLDB
295297
lldb
296298

@@ -301,6 +303,8 @@ lldb-test-swift-only
301303
lldb-assertions
302304

303305
[preset: lldb-pull-request]
306+
# Build libcxx for tests
307+
libcxx
304308
lldb
305309
lit-args=-v
306310

utils/build-script-impl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ for host in "${ALL_HOSTS[@]}"; do
17091709
libcxx)
17101710
build_targets=(cxx)
17111711
cmake_options=(
1712-
-DLLVM_ENABLE_RUNTIMES="libcxx" -DLIBCXX_INSTALL_LIBRARY=OFF
1712+
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DLIBCXX_INSTALL_LIBRARY=OFF
17131713
"${cmake_options[@]}"
17141714
"${llvm_cmake_options[@]}"
17151715
)
@@ -2126,6 +2126,7 @@ for host in "${ALL_HOSTS[@]}"; do
21262126
cmark_build_dir=$(build_directory ${host} cmark)
21272127
lldb_build_dir=$(build_directory ${host} lldb)
21282128
swift_build_dir=$(build_directory ${host} swift)
2129+
libcxx_build_dir=$(build_directory ${host} libcxx)
21292130

21302131
# Add any lldb extra cmake arguments here.
21312132

@@ -2205,6 +2206,7 @@ for host in "${ALL_HOSTS[@]}"; do
22052206
-DLLDB_ENABLE_LZMA=OFF
22062207
-DLLDB_ENABLE_LUA=OFF
22072208
-DLLDB_INCLUDE_TESTS:BOOL=$(false_true ${BUILD_TOOLCHAIN_ONLY})
2209+
-DLLDB_TEST_LIBCXX_ROOT_DIR:STRING="${libcxx_build_dir}"
22082210
-DLLDB_TEST_USER_ARGS="${DOTEST_ARGS}"
22092211
)
22102212

@@ -2650,10 +2652,6 @@ for host in "${ALL_HOSTS[@]}"; do
26502652
call env "${EXTRA_DISTCC_OPTIONS[@]}" "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${source_dir}"
26512653
fi
26522654

2653-
if [[ "${product}" == "libcxx" ]]; then
2654-
continue
2655-
fi
2656-
26572655
# Build.
26582656
if [[ $(not ${SKIP_BUILD}) ]]; then
26592657
if [[ "${CMAKE_GENERATOR}" == "Xcode" ]] ; then

0 commit comments

Comments
 (0)