From e63acdc4426cf0be4260ed48e49c123b26300ce3 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 1 Feb 2026 19:34:23 +0700 Subject: [PATCH 1/2] Split lld, add LLVM aarch64 target again --- recipes/dev/clang21/recipe.toml | 26 ++-------- recipes/dev/lld21/recipe.toml | 61 ++++++++++++++++++++++++ recipes/dev/llvm21/recipe.toml | 2 +- recipes/wip/dev/lang/dotnet8/recipe.toml | 2 +- recipes/wip/dev/lang/zig/recipe.toml | 4 +- 5 files changed, 70 insertions(+), 25 deletions(-) create mode 100644 recipes/dev/lld21/recipe.toml diff --git a/recipes/dev/clang21/recipe.toml b/recipes/dev/clang21/recipe.toml index 9977abfa3..47fd8409a 100644 --- a/recipes/dev/clang21/recipe.toml +++ b/recipes/dev/clang21/recipe.toml @@ -7,10 +7,13 @@ dependencies = [ "llvm21", ] dev-dependencies = [ - "host:clang21", # for clang-tblgen + "libstdcxx", # no idea + "llvm21.dev", + "llvm21.runtime", "host:llvm21", "host:llvm21.dev", "host:llvm21.runtime", + "host:clang21", # for clang-tblgen "host:xz", "host:libarchive", # workaround for cmake error ] @@ -40,7 +43,7 @@ COOKBOOK_CMAKE_FLAGS+=( -DLLVM_INCLUDE_TESTS=Off -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_TARGET_ARCH=$ARCH - -DLLVM_TARGETS_TO_BUILD="X86" + -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DLLVM_TOOLS_INSTALL_DIR=bin -DLLVM_UTILS_INSTALL_DIR=bin -DUNIX=1 @@ -81,16 +84,6 @@ fi """ -# lld runtime (no library) -[[optional-packages]] -name = "lld" -dependencies = [ ".runtime" ] -files = [ - "usr/bin/*.lld", - "usr/bin/*-ld", - "usr/bin/lld*", -] - [[optional-packages]] name = "dev" files = [ @@ -98,12 +91,3 @@ files = [ "usr/lib/libclang*.a", "usr/lib/cmake/clang/**", ] - -[[optional-packages]] -name = "lld-dev" -dependencies = [ ".lld" ] -files = [ - "usr/include/lld*/**", - "usr/lib/liblld*.a", - "usr/lib/cmake/lld/**", -] diff --git a/recipes/dev/lld21/recipe.toml b/recipes/dev/lld21/recipe.toml new file mode 100644 index 000000000..11cc7dceb --- /dev/null +++ b/recipes/dev/lld21/recipe.toml @@ -0,0 +1,61 @@ +[source] +same_as = "../llvm21" + +[build] +template = "custom" +dependencies = [ + "llvm21", + "zstd", +] +dev-dependencies = [ + "llvm21.dev", + "llvm21.runtime", + "host:llvm21", + "host:llvm21.dev", + "host:llvm21.runtime", + "host:xz", + "host:libarchive", # workaround for cmake error +] +script = """ +DYNAMIC_INIT +ARCH="$(echo "${TARGET}" | cut -d - -f1)" + +generate_cookbook_cmake_file $COOKBOOK_HOST_TARGET "" "$COOKBOOK_TOOLCHAIN" native.cmake + +COOKBOOK_CMAKE_FLAGS+=( + -DLLVM_ROOT="${COOKBOOK_SYSROOT}" + -DCROSS_TOOLCHAIN_FLAGS_NATIVE="-DCMAKE_TOOLCHAIN_FILE=$(realpath native.cmake)" + -DLLVM_TABLEGEN_EXE=${COOKBOOK_TOOLCHAIN}/bin/llvm-tblgen + +# the shared options from llvm + -DCMAKE_CXX_FLAGS="--std=gnu++11" + -DBUILD_SHARED_LIBS=False + -DLLVM_BUILD_EXAMPLES=Off + -DLLVM_BUILD_TESTS=Off + -DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET}" + -DLLVM_ENABLE_LTO=Off + -DLLVM_ENABLE_RTTI=On + -DLLVM_ENABLE_THREADS=On + -DLLVM_INCLUDE_EXAMPLES=Off + -DLLVM_INCLUDE_TESTS=Off + -DLLVM_OPTIMIZED_TABLEGEN=On + -DLLVM_TARGET_ARCH=$ARCH + -DLLVM_TARGETS_TO_BUILD="X86;AArch64" + -DLLVM_TOOLS_INSTALL_DIR=bin + -DLLVM_UTILS_INSTALL_DIR=bin + -DUNIX=1 +) + +COOKBOOK_SOURCE="$COOKBOOK_SOURCE/lld" + +cookbook_cmake +""" + +[[optional-packages]] +name = "dev" +dependencies = [] +files = [ + "usr/include/lld*/**", + "usr/lib/liblld*.a", + "usr/lib/cmake/lld/**", +] diff --git a/recipes/dev/llvm21/recipe.toml b/recipes/dev/llvm21/recipe.toml index f9dfcebff..6d618fc21 100644 --- a/recipes/dev/llvm21/recipe.toml +++ b/recipes/dev/llvm21/recipe.toml @@ -43,7 +43,7 @@ COOKBOOK_CMAKE_FLAGS+=( -DLLVM_INCLUDE_TESTS=Off -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_TARGET_ARCH=$ARCH - -DLLVM_TARGETS_TO_BUILD="X86" + -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DLLVM_TOOLS_INSTALL_DIR=bin -DLLVM_UTILS_INSTALL_DIR=bin -DUNIX=1 diff --git a/recipes/wip/dev/lang/dotnet8/recipe.toml b/recipes/wip/dev/lang/dotnet8/recipe.toml index 54813cfa7..7a324677e 100644 --- a/recipes/wip/dev/lang/dotnet8/recipe.toml +++ b/recipes/wip/dev/lang/dotnet8/recipe.toml @@ -17,6 +17,6 @@ dependencies = [ ] dev-dependencies = [ "host:clang21", - "host:clang21.lld", + "host:lld21", "host:llvm21.dev", ] diff --git a/recipes/wip/dev/lang/zig/recipe.toml b/recipes/wip/dev/lang/zig/recipe.toml index 879e8505d..b66de489d 100644 --- a/recipes/wip/dev/lang/zig/recipe.toml +++ b/recipes/wip/dev/lang/zig/recipe.toml @@ -15,8 +15,8 @@ dev-dependencies = [ "llvm21.runtime", "clang21", "clang21.dev", - "clang21.lld-dev", - "clang21.lld", + "lld21.dev", + "lld21", "host:libarchive", "host:zig", ] From 7cf9908b3572251b60e5a7f9d7a4cbce66c426e4 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 1 Feb 2026 19:35:04 +0700 Subject: [PATCH 2/2] Use proper jobs for rust recipe --- recipes/dev/rust/recipe.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index dadb3e1d8..81b4152e5 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -45,7 +45,7 @@ sed -i "s|COOKBOOK_TOOLCHAIN|${COOKBOOK_TOOLCHAIN}|g" config.toml python3 "${COOKBOOK_SOURCE}/x.py" install \ --config config.toml \ - --jobs $(nproc) + --jobs ${COOKBOOK_MAKE_JOBS} mkdir -p "${COOKBOOK_STAGE}"/usr rsync -av --delete "${COOKBOOK_BUILD}"/install/* "${COOKBOOK_STAGE}"/usr/