llvm/0001-Filter-out-cxxflags-not-supported-by-clang.patch

29 lines
1.2 KiB
Diff
Raw Normal View History

From d15c835028bcc72a8695d047f0acaa530aa54716 Mon Sep 17 00:00:00 2001
2019-08-01 16:23:58 +00:00
From: Tom Stellard <tstellar@redhat.com>
Date: Wed, 31 Jul 2019 20:43:42 -0700
Subject: [PATCH] Filter out cxxflags not supported by clang
---
llvm/tools/llvm-config/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
2019-08-01 16:23:58 +00:00
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt
index 8e97a10..9b9b7d1 100644
--- a/llvm/tools/llvm-config/CMakeLists.txt
+++ b/llvm/tools/llvm-config/CMakeLists.txt
@@ -43,7 +43,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
2019-01-25 17:43:56 +00:00
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
set(LLVM_CPPFLAGS "${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
2019-08-01 16:23:58 +00:00
set(LLVM_CXXFLAGS "${LLVM_CXX_STD_FLAG} ${LLVM_CXX_STDLIB_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
2019-01-25 17:43:56 +00:00
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
--
2019-08-01 16:23:58 +00:00
1.8.3.1