From 251fd55c27372d34d3d088815297d443856c4080 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Tue, 6 May 2025 03:03:59 +0300 Subject: clang: split SPIRV-LLVM-Translator to its own recipe The translator is not a part of the same source tree. As such it has tendency to break on clang upgrades. Split it to its own recipe in order to ease handling of clang. This also makes it use SPIR-V headers provided by the spirv-headers recipe instead of vendoring them in. (From OE-Core rev: 4178fe97371bce0bd63b19f57b872ccefd1ec45c) Signed-off-by: Dmitry Baryshkov Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- .../spir/spirv-llvm-translator_20.1.2.bb | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 meta/recipes-graphics/spir/spirv-llvm-translator_20.1.2.bb (limited to 'meta/recipes-graphics/spir/spirv-llvm-translator_20.1.2.bb') diff --git a/meta/recipes-graphics/spir/spirv-llvm-translator_20.1.2.bb b/meta/recipes-graphics/spir/spirv-llvm-translator_20.1.2.bb new file mode 100644 index 0000000000..bc2bebcda8 --- /dev/null +++ b/meta/recipes-graphics/spir/spirv-llvm-translator_20.1.2.bb @@ -0,0 +1,36 @@ +HOMEPAGE = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator" +SUMMARY = "LLVM/SPIR-V Bi-Directional Translator, a library and tool for translation between LLVM IR and SPIR-V." + +LICENSE = "NCSA" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" + +# pattern: llvm_branch_200, currently there are no minor releases, so, no llvm_branch_201 +SPIRV_BRANCH = "llvm_release_${@oe.utils.trim_version('${PV}', 1).replace('.', '')}0" +SRC_URI = " \ + git://github.com/KhronosGroup/SPIRV-LLVM-Translator;protocol=https;name=spirv;branch=${SPIRV_BRANCH} \ +" + +SRCREV_spirv = "6dd8f2a1681a27f16c53d932d2765920f312aeb2" + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +DEPENDS = "clang spirv-tools spirv-headers" + +inherit cmake pkgconfig python3native + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +# for CMAKE_SHARED_LIBS=OFF see https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1868 +EXTRA_OECMAKE = "\ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_SKIP_RPATH=ON \ + -DLLVM_EXTERNAL_LIT=lit \ + -DLLVM_INCLUDE_TESTS=ON \ + -Wno-dev \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${STAGING_INCDIR}/.. \ +" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf