[PATCH] D36033: [ubsan] Enable UBSan build for Fuchsia

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 13:19:01 PDT 2017


mcgrathr updated this revision to Diff 109189.
mcgrathr added a comment.

This is rebased and ready to land.
Please land it for me!

Thanks,
Roland


https://reviews.llvm.org/D36033

Files:
  cmake/config-ix.cmake
  lib/ubsan/ubsan_platform.h


Index: lib/ubsan/ubsan_platform.h
===================================================================
--- lib/ubsan/ubsan_platform.h
+++ lib/ubsan/ubsan_platform.h
@@ -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
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -533,7 +533,7 @@
 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36033.109189.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170801/9e2ca63a/attachment.bin>


More information about the llvm-commits mailing list