meta-intel/dynamic-layers/clang-layer/recipes-devtools/clang/files/llvm11-skip-building-tests.patch
Anuj Mittal 26de78f5fe llvm: fix build with LLVM11
Ensure that we can build with both dunfell (LLVM10) and current master
(LLVM11) of meta-clang. Look for LLVMVERSION set by meta-clang and
include relevant patches based on the version.

There's no official release for SPIRV-LLVM-Translator yet for LLVM11 so
pick the latest.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2020-10-15 11:55:42 +08:00

52 lines
1.4 KiB
Diff

From d362652617c5e840089273df0c6623a9745c92a2 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Wed, 21 Aug 2019 14:35:31 +0800
Subject: [PATCH] llvm-spirv: skip building tests
Some of these need clang to be built and since we're building this in-tree,
that leads to problems when compiling libcxx, compiler-rt which aren't built
in-tree.
Instead of using SPIRV_SKIP_CLANG_BUILD to skip clang build and adding this to
all components, disable the building of tests altogether.
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
CMakeLists.txt | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecebb4cb..578ca602 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,13 +25,6 @@ if(LLVM_SPIRV_BUILD_EXTERNAL)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
- if(LLVM_SPIRV_INCLUDE_TESTS)
- set(LLVM_TEST_COMPONENTS
- llvm-as
- llvm-dis
- )
- endif(LLVM_SPIRV_INCLUDE_TESTS)
-
find_package(LLVM ${BASE_LLVM_VERSION} REQUIRED
COMPONENTS
Analysis
@@ -62,9 +55,6 @@ set(LLVM_SPIRV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
add_subdirectory(lib/SPIRV)
add_subdirectory(tools/llvm-spirv)
-if(LLVM_SPIRV_INCLUDE_TESTS)
- add_subdirectory(test)
-endif(LLVM_SPIRV_INCLUDE_TESTS)
install(
FILES
--
2.26.2