diff --git a/recipes/archives/zstd/recipe.toml b/recipes/archives/zstd/recipe.toml index 906848506..2e723f8c6 100644 --- a/recipes/archives/zstd/recipe.toml +++ b/recipes/archives/zstd/recipe.toml @@ -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" diff --git a/recipes/dev/lld21/recipe.toml b/recipes/dev/lld21/recipe.toml index 1fa2cf5ac..e15dc3275 100644 --- a/recipes/dev/lld21/recipe.toml +++ b/recipes/dev/lld21/recipe.toml @@ -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 diff --git a/recipes/dev/llvm21/recipe.toml b/recipes/dev/llvm21/recipe.toml index 6b87a1b42..041243edc 100644 --- a/recipes/dev/llvm21/recipe.toml +++ b/recipes/dev/llvm21/recipe.toml @@ -7,7 +7,7 @@ shallow_clone = true [build] template = "custom" dependencies = [ - "zlib", + "zstd", "libxml2", ] dev-dependencies = [ @@ -39,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")" @@ -59,6 +60,14 @@ 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_USE_STATIC_ZSTD=On + ) +fi + COOKBOOK_SOURCE="$COOKBOOK_SOURCE/llvm" cookbook_cmake """