diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-02-14 21:04:45 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-03-01 11:12:14 -0800 |
commit | aa1ab889bcbb580f33151933d7ed44fd4a93f1bf (patch) | |
tree | c11d715e82ab86c9f9429b7f90479e3f1d8b0c1e | |
parent | 23a95b1adf01c7849ed88d8a2550d169c73679d1 (diff) | |
download | meta-clang-aa1ab889bcbb580f33151933d7ed44fd4a93f1bf.tar.gz |
spirv-llvm-translator: Add recipe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch | 26 | ||||
-rw-r--r-- | recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb | 40 |
2 files changed, 66 insertions, 0 deletions
diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch new file mode 100644 index 0000000..b52d97b --- /dev/null +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-Use-12.0.0-for-base-llvm-version.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 1e38777c321605d13f9ad254880e73459877d7da Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 14 Feb 2021 18:43:21 -0800 | ||
4 | Subject: [PATCH] Use 12.0.0 for base llvm version | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | CMakeLists.txt | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index 0ddb55ce..a9cd1978 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -1,6 +1,6 @@ | ||
17 | cmake_minimum_required(VERSION 3.3) | ||
18 | |||
19 | -set (BASE_LLVM_VERSION 13.0.0) | ||
20 | +set (BASE_LLVM_VERSION 12.0.0) | ||
21 | set(LLVM_SPIRV_VERSION ${BASE_LLVM_VERSION}.0) | ||
22 | |||
23 | option(LLVM_SPIRV_INCLUDE_TESTS | ||
24 | -- | ||
25 | 2.30.1 | ||
26 | |||
diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb new file mode 100644 index 0000000..a7b5580 --- /dev/null +++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | LICENSE = "NCSA" | ||
2 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" | ||
3 | |||
4 | BRANCH = "llvm_release_120" | ||
5 | SRC_URI = "git://github.com/KhronosGroup/SPIRV-LLVM-Translator/;protocol=https;branch=${BRANCH} \ | ||
6 | file://0001-Use-12.0.0-for-base-llvm-version.patch \ | ||
7 | " | ||
8 | |||
9 | PV = "12.0.0" | ||
10 | SRCREV = "c65388fcd4eac9ce070fc330d5fe263ba2c72d66" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | DEPENDS = "spirv-tools clang" | ||
15 | |||
16 | inherit cmake pkgconfig python3native | ||
17 | |||
18 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
19 | |||
20 | # Specify any options you want to pass to cmake using EXTRA_OECMAKE: | ||
21 | EXTRA_OECMAKE = "\ | ||
22 | -DBUILD_SHARED_LIBS=ON \ | ||
23 | -DLLVM_SPIRV_BUILD_EXTERNAL=YES \ | ||
24 | -DCMAKE_BUILD_TYPE=Release \ | ||
25 | -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
26 | -DCMAKE_SKIP_RPATH=ON \ | ||
27 | -DLLVM_EXTERNAL_LIT=lit \ | ||
28 | -DLLVM_INCLUDE_TESTS=ON \ | ||
29 | -Wno-dev \ | ||
30 | " | ||
31 | |||
32 | do_compile_append() { | ||
33 | oe_runmake llvm-spirv | ||
34 | } | ||
35 | |||
36 | do_install_append() { | ||
37 | install -Dm755 ${B}/tools/llvm-spirv/llvm-spirv ${D}${bindir}/llvm-spirv | ||
38 | } | ||
39 | |||
40 | BBCLASSEXTEND = "native nativesdk" | ||