[PATCH] light up UBSan for ARMv7
Greg Fitzgerald
gregf at codeaurora.org
Thu May 15 14:56:50 PDT 2014
Hi samsonov, eugenis, kcc,
You can expect UBSan to be built under any of the following conditions:
1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM
2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target)
3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot
http://reviews.llvm.org/D3794
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -215,9 +215,8 @@
test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})
elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})
- elseif("${LLVM_NATIVE_ARCH}" STREQUAL "ARM")
- test_target_arch(arm "")
endif()
+ test_target_arch(arm "-march=armv7")
endif()
# We support running instrumented tests when we're not cross compiling
@@ -354,7 +353,7 @@
filter_available_targets(MSAN_SUPPORTED_ARCH x86_64)
filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 arm)
filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)
-filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386)
+filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 arm)
add_subdirectory(include)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3794.9458.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140515/6737c260/attachment.bin>
More information about the llvm-commits
mailing list