Skip to content

Commit 70f3d82

Browse files
committed
Try to fix libxml2
1 parent 49e8d27 commit 70f3d82

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cmake/wasi-sdk-toolchain.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@ ExternalProject_Add(llvm-build
229229
-DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-wasip1
230230
-DLLVM_INSTALL_BINUTILS_SYMLINKS=TRUE
231231
-DLLVM_ENABLE_LIBXML2=OFF
232+
# LLDB's `FindLibXml2` module determines the libxml2 version solely via
233+
# pkg-config (`PC_LIBXML_VERSION`) and rejects it if the version can't be
234+
# found. The libxml2 we build above installs into `${wasi_tmp_install}`,
235+
# which isn't on the default pkg-config search path, so point pkg-config at
236+
# it via `CMAKE_PREFIX_PATH` to let LLVM's check succeed.
237+
-DCMAKE_PREFIX_PATH=${wasi_tmp_install}
238+
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
232239
# Pass `-s` to strip symbols by default and shrink the size of the
233240
# distribution
234241
-DCMAKE_EXE_LINKER_FLAGS=-s

0 commit comments

Comments
 (0)