summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/clang/libclc_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/clang/libclc_git.bb')
-rw-r--r--meta/recipes-devtools/clang/libclc_git.bb43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/clang/libclc_git.bb b/meta/recipes-devtools/clang/libclc_git.bb
new file mode 100644
index 0000000000..ed31de503a
--- /dev/null
+++ b/meta/recipes-devtools/clang/libclc_git.bb
@@ -0,0 +1,43 @@
1SUMMARY = "Implementation of the library requirements of the OpenCL C programming language."
2HOMEPAGE = "https://libclc.llvm.org"
3SECTION = "devel"
4
5require common-clang.inc
6require common-source.inc
7
8LIC_FILES_CHKSUM = "file://libclc/LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db"
9
10inherit cmake pkgconfig
11
12# Depend explicitly on clang-native instead of using TOOLCHAIN as the build
13# objects from this recipe are build explicitly using clang for GPU targets.
14# We could INHIBIT_DEFAULT_DEPS to avoid any other toolchain but then we need
15# to wrestle CMake to configure without a toolchain.
16DEPENDS += "clang-native spirv-llvm-translator-native"
17
18OECMAKE_SOURCEPATH = "${S}/libclc"
19B_NATIVE = "${B}-native"
20
21# Semicolon-separated list of targets to build
22LIBCLC_TARGETS ?= "all"
23
24EXTRA_OECMAKE = "-DLIBCLC_TARGETS_TO_BUILD=${LIBCLC_TARGETS} \
25 -DPREPARE_BUILTINS=${B_NATIVE}/prepare_builtins"
26
27# Need to build a native prepare_builtins binary in target builds. The easiest
28# way to do this is with a second native cmake build tree.
29do_build_prepare_builtins() {
30 cmake --fresh -G Ninja \
31 -S ${OECMAKE_SOURCEPATH} -B ${B_NATIVE} \
32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain-native.cmake \
33 -DLIBCLC_TARGETS_TO_BUILD=
34 cmake --build ${B_NATIVE} --target prepare_builtins
35}
36do_build_prepare_builtins:class-native() {
37 :
38}
39do_configure[prefuncs] += "do_build_prepare_builtins"
40
41FILES:${PN} += "${datadir}/clc"
42
43BBCLASSEXTEND = "native nativesdk"