summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/libclc_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/libclc_git.bb')
-rw-r--r--recipes-devtools/clang/libclc_git.bb37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-devtools/clang/libclc_git.bb b/recipes-devtools/clang/libclc_git.bb
new file mode 100644
index 0000000..9525b25
--- /dev/null
+++ b/recipes-devtools/clang/libclc_git.bb
@@ -0,0 +1,37 @@
1DESCRIPTION = "LLVM based OpenCL runtime support library"
2HOMEPAGE = "http://libclc.llvm.org/"
3SECTION = "libs"
4
5require clang.inc
6require common-source.inc
7
8TOOLCHAIN = "clang"
9
10LIC_FILES_CHKSUM = "file://libclc/LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db"
11
12inherit cmake pkgconfig python3native qemu
13
14DEPENDS += "qemu-native clang spirv-tools spirv-llvm-translator spirv-llvm-translator-native ncurses"
15
16OECMAKE_SOURCEPATH = "${S}/libclc"
17
18EXTRA_OECMAKE += " \
19 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
20 -Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \
21 -Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \
22 "
23
24do_configure_prepend () {
25 # Write out a qemu wrapper that will be used by cmake
26 # so that it can run target helper binaries through that.
27 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
28 cat > ${WORKDIR}/qemuwrapper << EOF
29#!/bin/sh
30$qemu_binary "\$@"
31EOF
32 chmod +x ${WORKDIR}/qemuwrapper
33}
34
35FILES_${PN} += "${datadir}/clc"
36
37BBCLASSEXTEND = "native nativesdk"