summaryrefslogtreecommitdiffstats
path: root/dynamic-layers
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-08-05 13:52:16 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2019-08-21 04:27:06 (GMT)
commit9c62233238a72a913090c175662f4b2550a2e3dd (patch)
tree805b6d058aac022bfcd6399d5885f6fa08c6610c /dynamic-layers
parent10b74dda871b4ce8244ef65f7c6463fd2217b181 (diff)
downloadmeta-intel-9c62233238a72a913090c175662f4b2550a2e3dd.tar.gz
opencl-clang: move to a separate recipe
Since this is managed as a separate repository, build it as a separate component instead of bundling with LLVM/clang. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r--dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend1
-rw-r--r--dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-point-to-correct-clang.patch59
-rw-r--r--dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend6
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch38
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_8.0.0.bb35
5 files changed, 74 insertions, 65 deletions
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend b/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend
index f8d5a25..cb71cb0 100644
--- a/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend
+++ b/dynamic-layers/clang-layer/recipes-devtools/clang/clang_%.bbappend
@@ -1,6 +1,5 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" 1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
2 2
3DEPENDS_append = " opencl-clang-native"
4LLVM_TARGETS_TO_BUILD = "X86" 3LLVM_TARGETS_TO_BUILD = "X86"
5 4
6do_install_append_intel-x86-common() { 5do_install_append_intel-x86-common() {
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-point-to-correct-clang.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-point-to-correct-clang.patch
deleted file mode 100644
index 0dfc537..0000000
--- a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-point-to-correct-clang.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 6c33fb58869ffb17106047c45ab8d3856966eaf7 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 26 Mar 2019 14:11:29 +0800
4Subject: [PATCH] point to correct clang project and tblgen
5
6Point to correct path for clang project as per the way we unpack. Also
7let llvm-tblgen path be passed from recipe itself.
8
9Also since we're going to do the patching ourselves, no need to look for
10git through cmake.
11
12Upstream-Status: Inappropriate [OE specific]
13---
14 CMakeLists.txt | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
17diff --git a/CMakeLists.txt b/CMakeLists.txt
18index 174133b..c769f08 100644
19--- a/CMakeLists.txt
20+++ b/CMakeLists.txt
21@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
22 include(AddLLVM)
23 include(TableGen)
24
25-find_package(Git REQUIRED)
26+#find_package(Git REQUIRED)
27
28 if (NOT WIN32)
29 add_subdirectory( linux_linker )
30@@ -80,7 +80,7 @@ set(TARGET_NAME ${COMMON_CLANG_LIBRARY_NAME}${BUILD_PLATFORM} )
31
32 if(NOT USE_PREBUILT_LLVM)
33 set(TARGET_BRANCH "ocl-open-80")
34- set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/tools/clang)
35+ set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/../clang)
36 set(CLANG_BASE_REVISION a03da8be08a208122e292016cb6cea1f30229677)
37
38 set(SPIRV_SOURCE_DIR ${LLVM_SOURCE_DIR}/projects/llvm-spirv)
39@@ -102,7 +102,7 @@ endif(NOT USE_PREBUILT_LLVM)
40 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
41 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
42
43-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
44+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
45 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
46 if(USE_PREBUILT_LLVM)
47 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
48@@ -153,7 +153,7 @@ endif()
49
50 if(NOT USE_PREBUILT_LLVM)
51 set(CLANG_BINARY_DIR ${LLVM_BINARY_DIR}/tools/clang/)
52- set(CLANG_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}/tools/clang/)
53+ set(CLANG_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}/../clang/)
54 include_directories(
55 ${CLANG_BINARY_DIR}/include # for tablegened includes
56 ${CLANG_SOURCE_DIR}/include # for basic headers
57--
582.19.1
59
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend b/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend
index f536f0f..7631c02 100644
--- a/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend
+++ b/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend
@@ -1,16 +1,12 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" 1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
2 2
3SRC_URI_append_intel-x86-common = " \ 3SRC_URI_append_intel-x86-common = " \
4 git://github.com/intel/opencl-clang.git;protocol=https;branch=ocl-open-80;destsuffix=git/llvm/projects/opencl-clang;name=opencl-clang \
5 git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=llvm_release_80;destsuffix=git/llvm/projects/llvm-spirv;name=spirv \
6 file://0001-point-to-correct-clang.patch;patchdir=llvm/projects/opencl-clang \
7 file://0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch;patchdir=clang \ 4 file://0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch;patchdir=clang \
8 file://0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch;patchdir=clang \ 5 file://0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch;patchdir=clang \
9 file://0003-OpenCL-Fix-assertion-due-to-blocks.patch;patchdir=clang \ 6 file://0003-OpenCL-Fix-assertion-due-to-blocks.patch;patchdir=clang \
10 file://0001-dont-export-targets-for-binaries.patch \ 7 file://0001-dont-export-targets-for-binaries.patch \
8 git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=llvm_release_80;destsuffix=git/llvm/projects/llvm-spirv;name=spirv \
11 file://0001-Update-LowerOpenCL-pass-to-handle-new-blocks-represn.patch;patchdir=llvm/projects/llvm-spirv \ 9 file://0001-Update-LowerOpenCL-pass-to-handle-new-blocks-represn.patch;patchdir=llvm/projects/llvm-spirv \
12 " 10 "
13 11
14SRCREV_opencl-clang = "daf5e4dd718477ae8cf89a283c653939d9182f15"
15SRCREV_spirv = "bd0f28fb92061d49c0f120b4dac3fd8956006745" 12SRCREV_spirv = "bd0f28fb92061d49c0f120b4dac3fd8956006745"
16
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch
new file mode 100644
index 0000000..b0bfa6e
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch
@@ -0,0 +1,38 @@
1From 40be69a2c9460aea40beab8734684050988b9322 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 26 Mar 2019 14:11:29 +0800
4Subject: [PATCH] point to correct llvm-tblgen
5
6Let llvm-tblgen path be passed from recipe itself.
7
8Also since we're going to do the patching ourselves, no need to look for
9git through cmake.
10
11Upstream-Status: Inappropriate [OE specific]
12
13---
14 CMakeLists.txt | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/CMakeLists.txt b/CMakeLists.txt
18index 174133b..be409e5 100644
19--- a/CMakeLists.txt
20+++ b/CMakeLists.txt
21@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
22 include(AddLLVM)
23 include(TableGen)
24
25-find_package(Git REQUIRED)
26+#find_package(Git REQUIRED)
27
28 if (NOT WIN32)
29 add_subdirectory( linux_linker )
30@@ -102,7 +102,7 @@ endif(NOT USE_PREBUILT_LLVM)
31 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
32 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
33
34-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
35+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
36 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
37 if(USE_PREBUILT_LLVM)
38 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_8.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_8.0.0.bb
new file mode 100644
index 0000000..6599c9b
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_8.0.0.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Common clang is a thin wrapper library around clang"
2DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
3 to compile OpenCL C kernels to SPIR-V modules."
4
5LICENSE = "NCSA"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
7
8SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-80;protocol=https \
9 file://point-to-correct-llvm-tblgen.patch \
10 "
11
12SRCREV = "daf5e4dd718477ae8cf89a283c653939d9182f15"
13
14S = "${WORKDIR}/git"
15
16inherit cmake
17DEPENDS += "clang clang-native"
18
19DEPENDS_append_class-target = " opencl-clang-native"
20LDFLAGS_append_class-native = " -fuse-ld=lld"
21
22COMPATIBLE_HOST = '(x86_64).*-linux'
23COMPATIBLE_HOST_libc-musl = "null"
24
25EXTRA_OECMAKE += "\
26 -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
27 -DCMAKE_SKIP_RPATH=TRUE \
28 "
29
30do_install_append_class-native() {
31 install -d ${D}${bindir}
32 install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
33}
34
35BBCLASSEXTEND = "native nativesdk"