diff options
Diffstat (limited to 'recipes-devtools/clang/libclc_git.bb')
-rw-r--r-- | recipes-devtools/clang/libclc_git.bb | 37 |
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 @@ | |||
1 | DESCRIPTION = "LLVM based OpenCL runtime support library" | ||
2 | HOMEPAGE = "http://libclc.llvm.org/" | ||
3 | SECTION = "libs" | ||
4 | |||
5 | require clang.inc | ||
6 | require common-source.inc | ||
7 | |||
8 | TOOLCHAIN = "clang" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://libclc/LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" | ||
11 | |||
12 | inherit cmake pkgconfig python3native qemu | ||
13 | |||
14 | DEPENDS += "qemu-native clang spirv-tools spirv-llvm-translator spirv-llvm-translator-native ncurses" | ||
15 | |||
16 | OECMAKE_SOURCEPATH = "${S}/libclc" | ||
17 | |||
18 | EXTRA_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 | |||
24 | do_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 "\$@" | ||
31 | EOF | ||
32 | chmod +x ${WORKDIR}/qemuwrapper | ||
33 | } | ||
34 | |||
35 | FILES_${PN} += "${datadir}/clc" | ||
36 | |||
37 | BBCLASSEXTEND = "native nativesdk" | ||