[asan] Disable CreateSigAltStack from Unix/Signals.inc for asan builds
authorVitaly Buka <vitalybuka@google.com>
Thu, 25 Aug 2016 03:32:49 +0000 (03:32 +0000)
committerVitaly Buka <vitalybuka@google.com>
Thu, 25 Aug 2016 03:32:49 +0000 (03:32 +0000)
Summary: Asan fails to UnsetAlternateSignalStack if it set by Unix/Signals.inc

Reviewers: kcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23864

llvm-svn: 279717

llvm/cmake/config-ix.cmake

index e16aefa..76a656e 100755 (executable)
@@ -170,7 +170,8 @@ if( HAVE_SETJMP_H )
   check_symbol_exists(siglongjmp setjmp.h HAVE_SIGLONGJMP)
   check_symbol_exists(sigsetjmp setjmp.h HAVE_SIGSETJMP)
 endif()
-if( HAVE_SIGNAL_H )
+// AddressSanitizer conflicts with lib/Support/Unix/Signals.inc
+if( HAVE_SIGNAL_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
   check_symbol_exists(sigaltstack signal.h HAVE_SIGALTSTACK)
 endif()
 if( HAVE_SYS_UIO_H )