Skip to content

Commit fe61e17

Browse files
committed
Build LLDB as part of wasi-sdk
This is intended to provide a known-good build of LLDB with wasm plugin support which can exist alongside the rest of the LLVM distribution provided by wasi-sdk.
1 parent a64d51d commit fe61e17

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmake/wasi-sdk-toolchain.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ foreach(target IN LISTS WASI_SDK_TARGETS)
3333
list(APPEND links_to_create ${target}-clang++)
3434
endforeach()
3535

36-
set(projects "lld;clang;clang-tools-extra")
36+
set(projects "lld;clang;clang-tools-extra;lldb")
3737

3838
set(tools
3939
clang
@@ -57,7 +57,8 @@ set(tools
5757
objdump
5858
objcopy
5959
c++filt
60-
llvm-config)
60+
llvm-config
61+
lldb)
6162

6263
# By default link LLVM dynamically to all the various tools. This greatly
6364
# reduces the binary size of all the tools through a shared library rather than
@@ -69,7 +70,7 @@ set(tools
6970
# `lib` dir gets put on `LD_LIBRARY_PATH` or similar.
7071
if(NOT WIN32)
7172
list(APPEND default_cmake_args -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_VERSION_SUFFIX=-wasi-sdk)
72-
list(APPEND tools LLVM clang-cpp)
73+
list(APPEND tools LLVM clang-cpp liblldb)
7374
endif()
7475

7576
list(TRANSFORM tools PREPEND --target= OUTPUT_VARIABLE build_targets)
@@ -90,6 +91,8 @@ ExternalProject_Add(llvm-build
9091
-DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-wasi
9192
-DLLVM_INSTALL_BINUTILS_SYMLINKS=TRUE
9293
-DLLVM_ENABLE_LIBXML2=OFF
94+
-DLLDB_INCLUDE_TESTS=OFF
95+
-DLLDB_INCLUDE_UNITTESTS=OFF
9396
# Pass `-s` to strip symbols by default and shrink the size of the
9497
# distribution
9598
-DCMAKE_EXE_LINKER_FLAGS=-s

0 commit comments

Comments
 (0)