summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2023-07-06 14:45:33 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2023-07-17 09:24:48 +0800
commit4f5cc7a0a09df11a26973e65bed279fd32b8c2d3 (patch)
tree91aba1d2f82d654433787e7e700361b184681db6 /dynamic-layers/clang-layer
parentdab85c23256f4e004fbe7a8fe5d4f41002f5c14a (diff)
downloadmeta-intel-4f5cc7a0a09df11a26973e65bed279fd32b8c2d3.tar.gz
intel-graphics-compiler: use qemu to run native binaries
Now that intel-skylake-64 can use qemu-user as well, don't build native version of the recipe simply for use by the target version. Build a qemuwrapper that can be passed to CMAKE_CROSSCOMPILING_EMULATOR. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb23
1 files changed, 11 insertions, 12 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb
index a8039b9b..69bdac56 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb
@@ -31,15 +31,14 @@ export B
31 31
32S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"
33 33
34inherit cmake pkgconfig 34inherit cmake pkgconfig qemu
35 35
36CXXFLAGS:append = " -Wno-error=nonnull" 36CXXFLAGS:append = " -Wno-error=nonnull"
37 37
38COMPATIBLE_HOST = '(x86_64).*-linux' 38COMPATIBLE_HOST = '(x86_64).*-linux'
39COMPATIBLE_HOST:libc-musl = "null" 39COMPATIBLE_HOST:libc-musl = "null"
40 40
41DEPENDS += " flex-native bison-native clang opencl-clang" 41DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native"
42DEPENDS:append:class-target = " clang-cross-x86_64 intel-graphics-compiler-native"
43 42
44RDEPENDS:${PN} += "opencl-clang" 43RDEPENDS:${PN} += "opencl-clang"
45 44
@@ -54,19 +53,19 @@ EXTRA_OECMAKE = " \
54 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 53 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
55 -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ 54 -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \
56 -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ 55 -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \
56 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
57 " 57 "
58 58
59do_install:append:class-native () { 59do_configure:prepend:class-target () {
60 install -d ${D}${bindir} 60 # Write out a qemu wrapper that will be used by cmake.
61 install ${B}/IGC/Release/elf_packager ${D}${bindir}/ 61 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
62 if ${@bb.utils.contains('PACKAGECONFIG', 'vc', 'true', 'false', d)}; then 62 cat > ${WORKDIR}/qemuwrapper << EOF
63 install ${B}/IGC/Release/CMCLTranslatorTool ${D}${bindir}/ 63#!/bin/sh
64 install ${B}/IGC/Release/vcb ${D}${bindir}/ 64$qemu_binary "\$@"
65 fi 65EOF
66 chmod +x ${WORKDIR}/qemuwrapper
66} 67}
67 68
68BBCLASSEXTEND = "native nativesdk"
69
70UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" 69UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$"
71 70
72FILES:${PN} += " \ 71FILES:${PN} += " \