[Sanitizer] Remove SANITIZER_NEEDS_SEGV from shared sanitizer_common headers.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 9 Jul 2014 23:59:40 +0000 (23:59 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 9 Jul 2014 23:59:40 +0000 (23:59 +0000)
Otherwise, it can be accidentally redefined when we build specific sanitizer
runtime. This definition should be provided only once - when we build
sanitizer_common library.

llvm-svn: 212663

compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h

index 91c0f23..0a70e16 100644 (file)
@@ -29,6 +29,11 @@ struct FlagDescription {
 
 IntrusiveList<FlagDescription> flag_descriptions;
 
+// If set, the tool will install its own SEGV signal handler by default.
+#ifndef SANITIZER_NEEDS_SEGV
+# define SANITIZER_NEEDS_SEGV 1
+#endif
+
 void SetCommonFlagsDefaults(CommonFlags *f) {
   f->symbolize = true;
   f->external_symbolizer_path = 0;
index 9db5f8f..c8985b4 100644 (file)
 # define SANITIZER_SUPPORTS_WEAK_HOOKS 0
 #endif
 
-// If set, the tool will install its own SEGV signal handler.
-#ifndef SANITIZER_NEEDS_SEGV
-# define SANITIZER_NEEDS_SEGV 1
-#endif
-
 // GCC does not understand __has_feature
 #if !defined(__has_feature)
 # define __has_feature(x) 0