From 737aa40a1c7e98a88fdad0d36b7ab47a4819be1a Mon Sep 17 00:00:00 2001 From: El Mehdi YOUNES Date: Thu, 22 May 2025 09:18:14 +0200 Subject: [PATCH] package/llvm-project: add llvm-runtimes package Add a new host package to install the CMake modules provided by the runtimes archive of LLVM. These modules are required to build components like libunwind since upstream refactored the common flag-handling logic into a shared file: `HandleFlags.cmake`. This package extracts and installs the relevant files to `$(HOST_DIR)/lib/cmake/llvm`, where other components like libunwind will look for them. see https://github.com/llvm/llvm-project/commit/0af67d167d6c811abf12ad6c27ee34ec1365e5fb Signed-off-by: El Mehdi YOUNES Signed-off-by: Bernd Kuhls [Mehdi v3: explicitly set version to 20.1.3 for now, it will be changed in llvm-project bump commit] Signed-off-by: Julien Olivain --- .../llvm-runtimes/llvm-runtimes.hash | 2 ++ .../llvm-project/llvm-runtimes/llvm-runtimes.mk | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 package/llvm-project/llvm-runtimes/llvm-runtimes.hash create mode 100644 package/llvm-project/llvm-runtimes/llvm-runtimes.mk diff --git a/package/llvm-project/llvm-runtimes/llvm-runtimes.hash b/package/llvm-project/llvm-runtimes/llvm-runtimes.hash new file mode 100644 index 0000000000..66d9e1f336 --- /dev/null +++ b/package/llvm-project/llvm-runtimes/llvm-runtimes.hash @@ -0,0 +1,2 @@ +# locally calculated +sha256 6394d8f111288c918421756037c10c4f8471325992e37c44cf8811b4e3dde00b runtimes-20.1.3.src.tar.xz diff --git a/package/llvm-project/llvm-runtimes/llvm-runtimes.mk b/package/llvm-project/llvm-runtimes/llvm-runtimes.mk new file mode 100644 index 0000000000..34ac9ece31 --- /dev/null +++ b/package/llvm-project/llvm-runtimes/llvm-runtimes.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# llvm-runtimes +# +################################################################################ + +LLVM_RUNTIMES_VERSION = 20.1.3 +LLVM_RUNTIMES_SITE = $(LLVM_PROJECT_SITE) +LLVM_RUNTIMES_SOURCE = runtimes-$(LLVM_RUNTIMES_VERSION).src.tar.xz +LLVM_RUNTIMES_LICENSE = Apache-2.0 with exceptions + +define HOST_LLVM_RUNTIMES_INSTALL_CMDS + mkdir -p $(HOST_DIR)/lib/cmake/llvm/Modules + cp -Rv $(@D)/cmake/Modules/* $(HOST_DIR)/lib/cmake/llvm +endef + +$(eval $(host-generic-package))