[compiler-rt] r309742 - [ubsan] Enable UBSan build for Fuchsia

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 13:48:36 PDT 2017


Author: vitalybuka
Date: Tue Aug  1 13:48:36 2017
New Revision: 309742

URL: http://llvm.org/viewvc/llvm-project?rev=309742&view=rev
Log:
[ubsan] Enable UBSan build for Fuchsia

Submitted on behalf of Roland McGrath.

Reviewers: vitalybuka, alekseyshl, kcc

Reviewed By: vitalybuka

Subscribers: srhines, kubamracek, mgorny, phosek, filcab, llvm-commits

Tags: #sanitizers

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

Modified:
    compiler-rt/trunk/cmake/config-ix.cmake
    compiler-rt/trunk/lib/ubsan/ubsan_platform.h

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=309742&r1=309741&r2=309742&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Aug  1 13:48:36 2017
@@ -533,7 +533,7 @@ else()
 endif()
 
 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|Fuchsia")
   set(COMPILER_RT_HAS_UBSAN TRUE)
 else()
   set(COMPILER_RT_HAS_UBSAN FALSE)

Modified: compiler-rt/trunk/lib/ubsan/ubsan_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_platform.h?rev=309742&r1=309741&r2=309742&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_platform.h (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_platform.h Tue Aug  1 13:48:36 2017
@@ -19,7 +19,7 @@
      defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
      defined(__s390__))
 # define CAN_SANITIZE_UB 1
-#elif defined(_WIN32)
+#elif defined(_WIN32) || defined(__Fuchsia__)
 # define CAN_SANITIZE_UB 1
 #else
 # define CAN_SANITIZE_UB 0




More information about the llvm-commits mailing list