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 0af67d167d

Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[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 <ju.o@free.fr>
This commit is contained in:
El Mehdi YOUNES
2025-05-22 09:18:14 +02:00
committed by Julien Olivain
parent df0805618b
commit 737aa40a1c
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# locally calculated
sha256 6394d8f111288c918421756037c10c4f8471325992e37c44cf8811b4e3dde00b runtimes-20.1.3.src.tar.xz

View File

@@ -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))