]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
llvm: support building libclc
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Thu, 10 Apr 2025 02:54:46 +0000 (05:54 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Apr 2025 10:44:18 +0000 (11:44 +0100)
commit2773404dec7840e2252cfd5bf474be70d8e7888f
treeded7b6fad8b6548f67a200f477e7ca59719f1785
parenta93d2bdf5c0cf1c2c08d99fd4ccd8d1aae0e0ba5
llvm: support building libclc

Current Mesa requires libclc in order to build Intel Gallium (iris) or
Vulkan drivers. In order to unblock Mesa updates, build libclc as a part
of the LLVM build process.

The libclc requires Clang for building, so enable Clang too via
LLVM_PROJECTS. Remove clang from the DESTDIR, so that it is only used
during the build process. Proper handling of Clang as a toolchain is a
separate and much more complicated topic. Clang is enabled for all kinds
of builds as it is a requirement for libclc to build.

Cleaning of ${datadir} has been moved to happen at the end of do_install
to be performed after do clang removal and made not to fail if
${datadir} is not empty, as libclc install files into that location.

NVPTX and SPIRV targets are enabled since they are required for the
libclc to link.

LLVM_NATIVE_TOOL_DIR is used to pass a path to the native tools built
via llvm-native instead of building them during the target and/or
nativesdk build.

The llvm-clc package is set to RPROVIDE libclc (and the recipe also
PROVIDEs libclc) in order to be compatible with the meta-clang packages
(and to be future-compatible with the split package after proper Clang
support is introduced to OE-Core).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/llvm/llvm_20.1.2.bb