Skip to content

Commit efeb35a

Browse files
committed
fix undef warning coming from LLVM
1 parent 1fffd23 commit efeb35a

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

deps/llvm.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ $(eval $(call LLVM_PATCH,llvm-rL332682)) # remove for 7.0
493493
$(eval $(call LLVM_PATCH,llvm-rL332302)) # remove for 7.0
494494
$(eval $(call LLVM_PATCH,llvm-rL332694)) # remove for 7.0
495495
$(eval $(call LLVM_PATCH,llvm-rL327898)) # remove for 7.0
496+
$(eval $(call LLVM_PATCH,llvm-6.0-DISABLE_ABI_CHECKS))
496497
endif # LLVM_VER
497498

498499
# Remove hardcoded OS X requirements in compilter-rt cmake build
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From d793ba4bacae51ae25be19c1636fcf38707938fd Mon Sep 17 00:00:00 2001
2+
From: Valentin Churavy <v.churavy@gmail.com>
3+
Date: Fri, 1 Jun 2018 17:43:55 -0400
4+
Subject: [PATCH] fix LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
5+
6+
---
7+
cmake/modules/HandleLLVMOptions.cmake | 2 +-
8+
include/llvm/Config/abi-breaking.h.cmake | 2 +-
9+
2 files changed, 2 insertions(+), 2 deletions(-)
10+
11+
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
12+
index 3d2dd48018c..b67ee6a896e 100644
13+
--- a/cmake/modules/HandleLLVMOptions.cmake
14+
+++ b/cmake/modules/HandleLLVMOptions.cmake
15+
@@ -572,7 +572,7 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
16+
17+
if (LLVM_ENABLE_PEDANTIC AND LLVM_COMPILER_IS_GCC_COMPATIBLE)
18+
append("-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
19+
- append("-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
20+
+ append("-Wno-long-long -Wundef" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
21+
endif()
22+
23+
add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
24+
diff --git a/include/llvm/Config/abi-breaking.h.cmake b/include/llvm/Config/abi-breaking.h.cmake
25+
index 7ae401e5b8a..d52c4609101 100644
26+
--- a/include/llvm/Config/abi-breaking.h.cmake
27+
+++ b/include/llvm/Config/abi-breaking.h.cmake
28+
@@ -20,7 +20,7 @@
29+
30+
/* Allow selectively disabling link-time mismatch checking so that header-only
31+
ADT content from LLVM can be used without linking libSupport. */
32+
-#if !LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
33+
+#ifndef LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
34+
35+
// ABI_BREAKING_CHECKS protection: provides link-time failure when clients build
36+
// mismatch with LLVM
37+
--
38+
2.17.0
39+

0 commit comments

Comments
 (0)