mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
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>
This commit is contained in:
parent
10b74dda87
commit
9c62233238
|
@ -1,6 +1,5 @@
|
|||
FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
|
||||
|
||||
DEPENDS_append = " opencl-clang-native"
|
||||
LLVM_TARGETS_TO_BUILD = "X86"
|
||||
|
||||
do_install_append_intel-x86-common() {
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
From 6c33fb58869ffb17106047c45ab8d3856966eaf7 Mon Sep 17 00:00:00 2001
|
||||
From: Anuj Mittal <anuj.mittal@intel.com>
|
||||
Date: Tue, 26 Mar 2019 14:11:29 +0800
|
||||
Subject: [PATCH] point to correct clang project and tblgen
|
||||
|
||||
Point to correct path for clang project as per the way we unpack. Also
|
||||
let llvm-tblgen path be passed from recipe itself.
|
||||
|
||||
Also since we're going to do the patching ourselves, no need to look for
|
||||
git through cmake.
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
---
|
||||
CMakeLists.txt | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 174133b..c769f08 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
include(AddLLVM)
|
||||
include(TableGen)
|
||||
|
||||
-find_package(Git REQUIRED)
|
||||
+#find_package(Git REQUIRED)
|
||||
|
||||
if (NOT WIN32)
|
||||
add_subdirectory( linux_linker )
|
||||
@@ -80,7 +80,7 @@ set(TARGET_NAME ${COMMON_CLANG_LIBRARY_NAME}${BUILD_PLATFORM} )
|
||||
|
||||
if(NOT USE_PREBUILT_LLVM)
|
||||
set(TARGET_BRANCH "ocl-open-80")
|
||||
- set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/tools/clang)
|
||||
+ set(CLANG_SOURCE_DIR ${LLVM_SOURCE_DIR}/../clang)
|
||||
set(CLANG_BASE_REVISION a03da8be08a208122e292016cb6cea1f30229677)
|
||||
|
||||
set(SPIRV_SOURCE_DIR ${LLVM_SOURCE_DIR}/projects/llvm-spirv)
|
||||
@@ -102,7 +102,7 @@ endif(NOT USE_PREBUILT_LLVM)
|
||||
set (COMPILE_OPTIONS_TD opencl_clang_options.td)
|
||||
set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
|
||||
|
||||
-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
|
||||
if(USE_PREBUILT_LLVM)
|
||||
set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
|
||||
@@ -153,7 +153,7 @@ endif()
|
||||
|
||||
if(NOT USE_PREBUILT_LLVM)
|
||||
set(CLANG_BINARY_DIR ${LLVM_BINARY_DIR}/tools/clang/)
|
||||
- set(CLANG_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}/tools/clang/)
|
||||
+ set(CLANG_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}/../clang/)
|
||||
include_directories(
|
||||
${CLANG_BINARY_DIR}/include # for tablegened includes
|
||||
${CLANG_SOURCE_DIR}/include # for basic headers
|
||||
--
|
||||
2.19.1
|
||||
|
|
@ -1,16 +1,12 @@
|
|||
FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI_append_intel-x86-common = " \
|
||||
git://github.com/intel/opencl-clang.git;protocol=https;branch=ocl-open-80;destsuffix=git/llvm/projects/opencl-clang;name=opencl-clang \
|
||||
git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=llvm_release_80;destsuffix=git/llvm/projects/llvm-spirv;name=spirv \
|
||||
file://0001-point-to-correct-clang.patch;patchdir=llvm/projects/opencl-clang \
|
||||
file://0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch;patchdir=clang \
|
||||
file://0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch;patchdir=clang \
|
||||
file://0003-OpenCL-Fix-assertion-due-to-blocks.patch;patchdir=clang \
|
||||
file://0001-dont-export-targets-for-binaries.patch \
|
||||
git://github.com/KhronosGroup/SPIRV-LLVM-Translator.git;protocol=https;branch=llvm_release_80;destsuffix=git/llvm/projects/llvm-spirv;name=spirv \
|
||||
file://0001-Update-LowerOpenCL-pass-to-handle-new-blocks-represn.patch;patchdir=llvm/projects/llvm-spirv \
|
||||
"
|
||||
|
||||
SRCREV_opencl-clang = "daf5e4dd718477ae8cf89a283c653939d9182f15"
|
||||
SRCREV_spirv = "bd0f28fb92061d49c0f120b4dac3fd8956006745"
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
From 40be69a2c9460aea40beab8734684050988b9322 Mon Sep 17 00:00:00 2001
|
||||
From: Anuj Mittal <anuj.mittal@intel.com>
|
||||
Date: Tue, 26 Mar 2019 14:11:29 +0800
|
||||
Subject: [PATCH] point to correct llvm-tblgen
|
||||
|
||||
Let llvm-tblgen path be passed from recipe itself.
|
||||
|
||||
Also since we're going to do the patching ourselves, no need to look for
|
||||
git through cmake.
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 174133b..be409e5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
include(AddLLVM)
|
||||
include(TableGen)
|
||||
|
||||
-find_package(Git REQUIRED)
|
||||
+#find_package(Git REQUIRED)
|
||||
|
||||
if (NOT WIN32)
|
||||
add_subdirectory( linux_linker )
|
||||
@@ -102,7 +102,7 @@ endif(NOT USE_PREBUILT_LLVM)
|
||||
set (COMPILE_OPTIONS_TD opencl_clang_options.td)
|
||||
set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
|
||||
|
||||
-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
|
||||
if(USE_PREBUILT_LLVM)
|
||||
set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
|
|
@ -0,0 +1,35 @@
|
|||
SUMMARY = "Common clang is a thin wrapper library around clang"
|
||||
DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
|
||||
to compile OpenCL C kernels to SPIR-V modules."
|
||||
|
||||
LICENSE = "NCSA"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
|
||||
|
||||
SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-80;protocol=https \
|
||||
file://point-to-correct-llvm-tblgen.patch \
|
||||
"
|
||||
|
||||
SRCREV = "daf5e4dd718477ae8cf89a283c653939d9182f15"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake
|
||||
DEPENDS += "clang clang-native"
|
||||
|
||||
DEPENDS_append_class-target = " opencl-clang-native"
|
||||
LDFLAGS_append_class-native = " -fuse-ld=lld"
|
||||
|
||||
COMPATIBLE_HOST = '(x86_64).*-linux'
|
||||
COMPATIBLE_HOST_libc-musl = "null"
|
||||
|
||||
EXTRA_OECMAKE += "\
|
||||
-DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
"
|
||||
|
||||
do_install_append_class-native() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -1,25 +0,0 @@
|
|||
SUMMARY = "Common clang is a thin wrapper library around clang"
|
||||
DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
|
||||
to compile OpenCL C kernels to SPIR-V modules."
|
||||
|
||||
LICENSE = "NCSA"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
|
||||
|
||||
SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-80;protocol=https"
|
||||
|
||||
SRCREV = "daf5e4dd718477ae8cf89a283c653939d9182f15"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit native
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
do_compile() {
|
||||
${CC} linux_linker/linux_resource_linker.cpp -o linux_resource_linker
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 linux_resource_linker ${D}${bindir}/
|
||||
}
|
Loading…
Reference in New Issue
Block a user