[PATCH] [UBSan] Enable -Wglobal-constructors.

Yury Gribov tetra2005 at gmail.com
Wed Feb 4 05:33:17 PST 2015


Hi samsonov, eugenis,

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7405

Files:
  lib/ubsan/CMakeLists.txt

Index: lib/ubsan/CMakeLists.txt
===================================================================
--- lib/ubsan/CMakeLists.txt
+++ lib/ubsan/CMakeLists.txt
@@ -17,7 +17,12 @@
 
 set(UBSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
 append_no_rtti_flag(UBSAN_CFLAGS)
+append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors
+               UBSAN_CFLAGS)
+
 set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CFLAGS})
+append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors
+               UBSAN_CXXFLAGS)
 
 add_custom_target(ubsan)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7405.19314.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/abd00afa/attachment.bin>


More information about the llvm-commits mailing list