summaryrefslogtreecommitdiffstats
path: root/dynamic-layers
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-08-15 00:21:03 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2019-08-21 04:27:06 (GMT)
commitfca3176ec1eeea018db1d96e057ce477faa05319 (patch)
tree259b5675963d746cec087857fbcd8a08762f4b33 /dynamic-layers
parent9804b5a0e974a33cd65dab2f33f8c66c8f67064a (diff)
downloadmeta-intel-fca3176ec1eeea018db1d96e057ce477faa05319.tar.gz
igc: build for native too
* Use clang and lld for native builds to remain in sync with clang layer. * fix the license field to point to correct block of license in source file. * Include patches to ignore warnings being marked as errors when building with clang and to fix an issue with inclusion of debug functions when NDEBUG is defined. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch86
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-suppress-warnings-being-marked-as-errors.patch34
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.6.bb13
3 files changed, 130 insertions, 3 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
new file mode 100644
index 0000000..c9128a0
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-comment-out-dump-functions.patch
@@ -0,0 +1,86 @@
1From f56b781c244347158467a01aef65d2787afd1366 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Sat, 17 Aug 2019 21:25:06 +0800
4Subject: [PATCH] comment out dump functions
5
6Otherwise it leads to errors when linking with lld:
7
8| ld.lld: error: undefined symbol: llvm::Value::dump() const
9| >>> referenced by PreRAScheduler.cpp:252 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:252)
10| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpDDGContents()) in archive IGC/Release/libCompiler.a
11|
12| ld.lld: error: undefined symbol: llvm::Value::dump() const
13| >>> referenced by PreRAScheduler.cpp:855 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:855)
14| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
15|
16| ld.lld: error: undefined symbol: llvm::Value::dump() const
17| >>> referenced by PreRAScheduler.cpp:876 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:876)
18| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
19|
20| ld.lld: error: undefined symbol: llvm::Value::dump() const
21| >>> referenced by PreRAScheduler.cpp:888 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:888)
22| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
23|
24| ld.lld: error: undefined symbol: llvm::Value::dump() const
25| >>> referenced by PreRAScheduler.cpp:902 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:902)
26| >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a
27| clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
28| ninja: build stopped: subcommand failed.
29
30Upstream-Status: Submitted [https://github.com/intel/intel-graphics-compiler/pull/105]
31
32Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
33---
34 IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | 6 ++++++
35 1 file changed, 6 insertions(+)
36
37diff --git a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
38index 587e491..4effa80 100644
39--- a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
40+++ b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp
41@@ -178,8 +178,10 @@ namespace IGC{
42 AU.addRequired<RegisterEstimator>();
43 }
44
45+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
46 void dumpDDGContents();
47 void dumpPriorityQueueContents();
48+#endif
49
50 void clearDDG();
51
52@@ -228,6 +230,7 @@ IGC_INITIALIZE_PASS_DEPENDENCY(RegisterEstimator)
53 IGC_INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
54 IGC_INITIALIZE_PASS_END(PreRAScheduler, PASS_FLAG, PASS_DESC, PASS_CFG_ONLY, PASS_ANALYSIS)
55
56+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
57 void PreRAScheduler::dumpDDGContents()
58 {
59 IGC_SET_FLAG_VALUE(PrintToConsole, 1);
60@@ -259,6 +262,7 @@ void PreRAScheduler::dumpDDGContents()
61
62 IGC_SET_FLAG_VALUE(PrintToConsole, 0);
63 }
64+#endif
65
66 void PreRAScheduler::clearDDG()
67 {
68@@ -841,6 +845,7 @@ bool PreRAScheduler::ScheduleReadyNodes(
69 return Changed;
70 }
71
72+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
73 void PreRAScheduler::dumpPriorityQueueContents()
74 {
75 llvm::PriorityQueue<Node*, std::vector<Node*>, PreRAScheduler::OrderByLatency> longLatencyQueueCopy = longLatencyDelaySortedReadyQueue;
76@@ -912,6 +917,7 @@ void PreRAScheduler::dumpPriorityQueueContents()
77
78 IGC_SET_FLAG_VALUE(PrintToConsole, 0);
79 }
80+#endif
81
82 bool PreRAScheduler::runOnFunction(Function &F) {
83 CodeGenContext *ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
84--
852.7.4
86
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-suppress-warnings-being-marked-as-errors.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-suppress-warnings-being-marked-as-errors.patch
new file mode 100644
index 0000000..cbb0197
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-suppress-warnings-being-marked-as-errors.patch
@@ -0,0 +1,34 @@
1From 68d99547e620f097b5fca7315d52d411ffc75984 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Fri, 16 Aug 2019 15:49:39 +0800
4Subject: [PATCH] suppress warnings being marked as errors
5
6Otherwise when building with clang-8:
7
8| clang-8: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated]
9
10Also see:
11https://github.com/intel/intel-graphics-compiler/issues/106
12
13Upstream-Status: Inappropriate
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 IGC/CMakeLists.txt | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/IGC/CMakeLists.txt b/IGC/CMakeLists.txt
20index 7ff05f3..5deac46 100644
21--- a/IGC/CMakeLists.txt
22+++ b/IGC/CMakeLists.txt
23@@ -2763,7 +2763,7 @@ foreach(_compilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
24 -march=corei7
25 -mstackrealign
26 -fms-extensions
27- -Werror
28+ -Wno-error
29 -Wno-unused-parameter
30 -Wno-missing-field-initializers
31 -Wwrite-strings
32--
332.7.4
34
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
index 655df69..036ab74 100644
--- 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
@@ -5,11 +5,13 @@ hardware architecture."
5 5
6LICENSE = "MIT & BSD-3-Clause" 6LICENSE = "MIT & BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ 7LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \
8 file://IGC/Compiler/LegalizationPass.cpp;md5=4e9a7f0d710a0546cbf5581e1565a986" 8 file://IGC/Compiler/LegalizationPass.cpp;beginline=1;endline=25;md5=4abf1738ff96b18e34186eb763e28eeb"
9 9
10SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ 10SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \
11 file://0001-skip-execution-of-ElfPackager.patch \ 11 file://0001-skip-execution-of-ElfPackager.patch \
12 file://0001-suppress-warnings-being-marked-as-errors.patch \
12 file://0001-Fix-for-the-gcc-9-issue.patch \ 13 file://0001-Fix-for-the-gcc-9-issue.patch \
14 file://0001-comment-out-dump-functions.patch \
13 " 15 "
14 16
15SRCREV = "ebfc688126900a821e407a96417800919b793447" 17SRCREV = "ebfc688126900a821e407a96417800919b793447"
@@ -21,9 +23,14 @@ inherit cmake
21COMPATIBLE_HOST = '(x86_64).*-linux' 23COMPATIBLE_HOST = '(x86_64).*-linux'
22COMPATIBLE_HOST_libc-musl = "null" 24COMPATIBLE_HOST_libc-musl = "null"
23 25
24DEPENDS_class-target = " flex-native bison-native clang clang-cross-x86_64" 26DEPENDS += " flex-native bison-native clang opencl-clang"
27DEPENDS_append_class-target = " clang-cross-x86_64"
25 28
26EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2" 29EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2"
27EXTRA_OECMAKE += "-DCOMMON_CLANG_LIBRARY_NAME=common_clang" 30
31LDFLAGS_append_class-native = " -fuse-ld=lld"
32TOOLCHAIN_class-native = "clang"
33
34BBCLASSEXTEND = "native nativesdk"
28 35
29UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" 36UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$"