Use zstd for llvm

This commit is contained in:
Wildan M 2026-02-13 09:29:15 +07:00
parent 0fcf1b23ae
commit 45aa4951eb
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
2 changed files with 9 additions and 3 deletions

View File

@ -45,6 +45,13 @@ COOKBOOK_CMAKE_FLAGS+=(
-DUNIX=1
)
if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then
# avoid linking as much as possible during bootstrapping
COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_USE_STATIC_ZSTD=On
)
fi
COOKBOOK_SOURCE="$COOKBOOK_SOURCE/lld"
cookbook_cmake

View File

@ -7,13 +7,12 @@ shallow_clone = true
[build]
template = "custom"
dependencies = [
"zlib",
"zstd",
"libxml2",
]
dev-dependencies = [
"host:xz",
"host:libarchive", # workaround for cmake error
"host:zstd"
]
script = """
DYNAMIC_INIT
@ -40,6 +39,7 @@ COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_TOOL_LLVM_COV_BUILD=On
-DLLVM_TOOL_LLVM_PROFDATA_BUILD=On
-DLLVM_TARGETS_TO_BUILD="$LLVM_TARGETS_TO_BUILD"
-DLLVM_ENABLE_ZLIB=Off
# the rest of options that shared to clang
-DCROSS_TOOLCHAIN_FLAGS_NATIVE="-DCMAKE_TOOLCHAIN_FILE=$(realpath "${COOKBOOK_RECIPE}/native.cmake")"
@ -64,7 +64,6 @@ if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then
# avoid linking as much as possible during bootstrapping
COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_ENABLE_LIBXML2=Off
-DLLVM_ENABLE_ZLIB=Off
-DLLVM_USE_STATIC_ZSTD=On
)
fi