diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2019-07-31 18:29:53 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2019-07-31 21:03:31 +0800 |
commit | 03f21762497caa871c949c4eff9f6c980fec3342 (patch) | |
tree | d8328473ff3ffda6e53bc6ea9554b0631e198b83 /dynamic-layers | |
parent | e3d7b3aba6f65d7c4423fb77c34998cfd7e6ec3b (diff) | |
download | meta-intel-03f21762497caa871c949c4eff9f6c980fec3342.tar.gz |
intel-graphics-compiler: build only when clang layer is included
igc needs components from LLVM and clang to be built. Move it to
dynamic-layers/clang-layer so world builds don't fail when clang layer
is not available.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers')
3 files changed, 142 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch new file mode 100644 index 00000000..70447176 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-Fix-for-the-gcc-9-issue.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From c3e985e0e82e9b4c2cc8d4dbfd8ff7890daa50e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Wesierski, Lukasz" <lukasz.wesierski@intel.com> | ||
3 | Date: Thu, 6 Jun 2019 21:00:00 -0700 | ||
4 | Subject: [PATCH] Fix for the gcc-9 issue. | ||
5 | |||
6 | Fixes #91 | ||
7 | |||
8 | Change-Id: I8149771d6add9645126cb94584f46485c256a488 | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | [https://github.com/intel/intel-graphics-compiler/commit/b95b2220ddd1d50b718cae6829d832a14ff60790] | ||
12 | |||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/AdaptorOCL/cif/cif/common/cif.h | 8 ++++++++ | ||
16 | IGC/common/LLVMWarningsPop.hpp | 4 ++++ | ||
17 | IGC/common/LLVMWarningsPush.hpp | 10 ++++++++++ | ||
18 | 3 files changed, 22 insertions(+) | ||
19 | |||
20 | diff --git a/IGC/AdaptorOCL/cif/cif/common/cif.h b/IGC/AdaptorOCL/cif/cif/common/cif.h | ||
21 | index 99d67d5a..00352964 100644 | ||
22 | --- a/IGC/AdaptorOCL/cif/cif/common/cif.h | ||
23 | +++ b/IGC/AdaptorOCL/cif/cif/common/cif.h | ||
24 | @@ -310,6 +310,14 @@ struct InterfacesList { | ||
25 | requestedInterfaceId, std::forward<DefaultValueT>(defaultValue), std::forward<Args>(args)...); | ||
26 | } | ||
27 | |||
28 | + /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. | ||
29 | + /// Arguments will be forwarded as regular function parameters to Callable::Call. | ||
30 | + template <typename Callable, typename RetType, typename DefaultValueT> | ||
31 | + static RetType forwardToOne(InterfaceId_t requestedInterfaceId, DefaultValueT &&defaultValue) { | ||
32 | + return forwardToOneImpl<0, RetType, Callable, DefaultValueT, InterfacePack<SupportedInterfaces...>>( | ||
33 | + requestedInterfaceId, std::forward<DefaultValueT>(defaultValue)); | ||
34 | + } | ||
35 | + | ||
36 | /// Calls Callable::Call with all contained interfaces (sequentially, one at a time) as template parameters. | ||
37 | /// Arguments will be forwarded as regular function parameters to Callable::Call. | ||
38 | template <typename Callable, typename... Args> | ||
39 | diff --git a/IGC/common/LLVMWarningsPop.hpp b/IGC/common/LLVMWarningsPop.hpp | ||
40 | index 9875acb8..f8e405d2 100644 | ||
41 | --- a/IGC/common/LLVMWarningsPop.hpp | ||
42 | +++ b/IGC/common/LLVMWarningsPop.hpp | ||
43 | @@ -57,3 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
44 | #ifdef _MSC_VER | ||
45 | # pragma warning( pop ) | ||
46 | #endif | ||
47 | + | ||
48 | +#if defined(__linux__) | ||
49 | +# pragma GCC diagnostic pop | ||
50 | +#endif | ||
51 | diff --git a/IGC/common/LLVMWarningsPush.hpp b/IGC/common/LLVMWarningsPush.hpp | ||
52 | index bab4a5e1..aca8db34 100644 | ||
53 | --- a/IGC/common/LLVMWarningsPush.hpp | ||
54 | +++ b/IGC/common/LLVMWarningsPush.hpp | ||
55 | @@ -55,8 +55,18 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
56 | # pragma warning( push ) | ||
57 | #endif | ||
58 | |||
59 | +#if defined(__linux__) | ||
60 | +# pragma GCC diagnostic push | ||
61 | +#endif | ||
62 | + | ||
63 | #include <llvm/Config/llvm-config.h> | ||
64 | |||
65 | +#if defined(__linux__) | ||
66 | +# if __GNUC__ > 8 | ||
67 | +# pragma GCC diagnostic ignored "-Winit-list-lifetime" | ||
68 | +# endif | ||
69 | +#endif | ||
70 | + | ||
71 | #if defined( _WIN32 ) || defined( _WIN64 ) | ||
72 | |||
73 | // 'inline' : used more than once | ||
74 | -- | ||
75 | 2.17.0 | ||
76 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch new file mode 100644 index 00000000..1e0c3444 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 78270818abd269bc8a1cf5deb69f15e3849333fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 12 Jun 2019 14:10:23 +0800 | ||
4 | Subject: [PATCH] skip execution of ElfPackager | ||
5 | |||
6 | ElfPackager adds the ability to convert llvm bitcode into elf files for | ||
7 | easier partitioning. Skip for now until we start building a native | ||
8 | version for this. | ||
9 | |||
10 | Upstream-Status: Inappropriate [configuration specific] | ||
11 | |||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/ElfPackager/CMakeLists.txt | 8 ++++---- | ||
16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt | ||
19 | index 6bf4aa01..d8cd4e8b 100644 | ||
20 | --- a/IGC/ElfPackager/CMakeLists.txt | ||
21 | +++ b/IGC/ElfPackager/CMakeLists.txt | ||
22 | @@ -69,10 +69,10 @@ include_directories ( | ||
23 | ${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/ | ||
24 | ) | ||
25 | |||
26 | -add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
27 | - POST_BUILD | ||
28 | - COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
29 | - ) | ||
30 | +#add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
31 | +# POST_BUILD | ||
32 | +# COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
33 | +# ) | ||
34 | |||
35 | |||
36 | add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}") | ||
37 | -- | ||
38 | 2.17.0 | ||
39 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb new file mode 100644 index 00000000..f64b97fd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ | ||
3 | llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ | ||
4 | hardware architecture." | ||
5 | |||
6 | LICENSE = "MIT & BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ | ||
8 | file://IGC/Compiler/LegalizationPass.cpp;md5=4e9a7f0d710a0546cbf5581e1565a986" | ||
9 | |||
10 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ | ||
11 | file://0001-skip-execution-of-ElfPackager.patch \ | ||
12 | file://0001-Fix-for-the-gcc-9-issue.patch \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "ebfc688126900a821e407a96417800919b793447" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
22 | COMPATIBLE_HOST_libc-musl = "null" | ||
23 | |||
24 | DEPENDS_class-target = " flex-native bison-native clang clang-cross-x86_64" | ||
25 | |||
26 | EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2" | ||
27 | EXTRA_OECMAKE += "-DCOMMON_CLANG_LIBRARY_NAME=common_clang" | ||