|
|
|
|
@ -109,6 +109,22 @@ if(WASI_SDK_LLDB)
|
|
|
|
|
-DLLDB_ENABLE_LINUXPTY=OFF
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(extra_configure_commands)
|
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
|
|
|
|
|
set(extra_configure_commands
|
|
|
|
|
# By default it looks like `libedit` tries to link to `libncurses.so` and
|
|
|
|
|
# such on Linux. This is problematic as systems may not have that
|
|
|
|
|
# installed. Turns out though at least for AlmaLinux [1] they just edit
|
|
|
|
|
# makefile and pkg-config info and it works out. Who knew! I thought
|
|
|
|
|
# one of the millions of lines in `./configure` would take care of this
|
|
|
|
|
# but apparently we're still resorting to editing things raw...
|
|
|
|
|
#
|
|
|
|
|
# [1]: https://git.almalinux.org/rpms/libedit/src/commit/3f0893c4cd8e0cbb2f556d2fad48326c9c037a6c/SPECS/libedit.spec#L44-L48
|
|
|
|
|
COMMAND sed -i "s/lncurses/ltinfo/" src/Makefile
|
|
|
|
|
COMMAND sed -i "s/ -lncurses//" libedit.pc
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (WASI_SDK_LIBEDIT)
|
|
|
|
|
include(ProcessorCount)
|
|
|
|
|
ProcessorCount(nproc)
|
|
|
|
|
@ -129,10 +145,13 @@ if(WASI_SDK_LLDB)
|
|
|
|
|
--prefix=${wasi_tmp_install}
|
|
|
|
|
--enable-pic
|
|
|
|
|
--disable-examples
|
|
|
|
|
--disable-static
|
|
|
|
|
--disable-silent-rules
|
|
|
|
|
CC=${CMAKE_C_COMPILER}
|
|
|
|
|
LDFLAGS=${libedit_ldflags}
|
|
|
|
|
${extra_configure_commands}
|
|
|
|
|
BUILD_COMMAND
|
|
|
|
|
${MAKE_EXECUTABLE} -j${nproc} V=1
|
|
|
|
|
${MAKE_EXECUTABLE} -j${nproc}
|
|
|
|
|
|
|
|
|
|
USES_TERMINAL_CONFIGURE ON
|
|
|
|
|
USES_TERMINAL_BUILD ON
|
|
|
|
|
@ -154,6 +173,12 @@ if(WASI_SDK_LLDB)
|
|
|
|
|
list(APPEND libxml_cmake_args -DLIBXML2_WITH_ICONV=OFF)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Our AlmaLinux:8 container ends up using `lib64` instead of `lib` by default
|
|
|
|
|
# which doesn't match LLVM, so specifically use the same dir as LLVM.
|
|
|
|
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
|
list(APPEND libxml_cmake_args -DCMAKE_INSTALL_LIBDIR=lib)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (WASI_SDK_LIBXML2)
|
|
|
|
|
ExternalProject_Add(libxml2
|
|
|
|
|
URL https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.2.tar.xz
|
|
|
|
|
|