Reduce llvm link during bootstrap

This commit is contained in:
Wildan M 2026-02-13 08:58:17 +07:00
parent 5e29ff18f3
commit 0fcf1b23ae
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
2 changed files with 11 additions and 1 deletions

View File

@ -6,7 +6,7 @@ patches = [
[build]
template = "custom"
script = """
DYNAMIC_INIT
DYNAMIC_STATIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
${COOKBOOK_MAKE}
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"

View File

@ -13,6 +13,7 @@ dependencies = [
dev-dependencies = [
"host:xz",
"host:libarchive", # workaround for cmake error
"host:zstd"
]
script = """
DYNAMIC_INIT
@ -59,6 +60,15 @@ COOKBOOK_CMAKE_FLAGS+=(
-DUNIX=1
)
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
COOKBOOK_SOURCE="$COOKBOOK_SOURCE/llvm"
cookbook_cmake
"""