diff options
| author | Marcin Koscielnicki <koriakin@0x04.net> | 2016-04-15 22:25:04 +0000 |
|---|---|---|
| committer | Marcin Koscielnicki <koriakin@0x04.net> | 2016-04-15 22:25:04 +0000 |
| commit | b5e4804aee078e54bf95451c424272dcf5e628fb (patch) | |
| tree | 1c7de787126c6024112de98c0850febdc9f302f1 /compiler-rt | |
| parent | 604d873aa162335bbbdc17a7ad1d43cc7284ff12 (diff) | |
| download | bcm5719-llvm-b5e4804aee078e54bf95451c424272dcf5e628fb.tar.gz bcm5719-llvm-b5e4804aee078e54bf95451c424272dcf5e628fb.zip | |
[sanitizer] [SystemZ] Enable UBSan.
sanitizer_common is now in good enough shape on s390x to support UBSan
- all tests passing. Let's enable it.
Differential Revision: http://reviews.llvm.org/D19157
llvm-svn: 266483
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/cmake/config-ix.cmake | 10 | ||||
| -rw-r--r-- | compiler-rt/lib/ubsan/ubsan_platform.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index d4a176badc9..902b21f5a9f 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -109,6 +109,7 @@ macro(detect_target_arch) check_symbol_exists(__i386__ "" __I386) check_symbol_exists(__mips__ "" __MIPS) check_symbol_exists(__mips64__ "" __MIPS64) + check_symbol_exists(__s390x__ "" __S390X) check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32) check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64) if(__ARM) @@ -125,6 +126,8 @@ macro(detect_target_arch) add_default_target_arch(mips64) elseif(__MIPS) add_default_target_arch(mips) + elseif(__S390X) + add_default_target_arch(s390x) elseif(__WEBASSEMBLY32) add_default_target_arch(wasm32) elseif(__WEBASSEMBLY64) @@ -188,6 +191,8 @@ elseif(NOT APPLE) # Supported archs for Apple platforms are generated later else() test_target_arch(powerpc64le "" "-m64") endif() + elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x") + test_target_arch(s390x "" "") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mipsel|mips64el") # Gcc doesn't accept -m32/-m64 so we do the next best thing and use # -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match @@ -238,6 +243,7 @@ set(X86_64 x86_64) set(MIPS32 mips mipsel) set(MIPS64 mips64 mips64el) set(PPC64 powerpc64 powerpc64le) +set(S390X s390x) set(WASM32 wasm32) set(WASM64 wasm64) @@ -250,7 +256,7 @@ endif() set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${WASM32} ${WASM64}) set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64} - ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) + ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X}) set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64}) set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64}) @@ -260,7 +266,7 @@ set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64} ${MIPS32} ${MIPS64}) set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64}) set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} - ${MIPS32} ${MIPS64} ${PPC64}) + ${MIPS32} ${MIPS64} ${PPC64} ${S390X}) set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64}) diff --git a/compiler-rt/lib/ubsan/ubsan_platform.h b/compiler-rt/lib/ubsan/ubsan_platform.h index 002ecf32a59..1a3bfd6afb8 100644 --- a/compiler-rt/lib/ubsan/ubsan_platform.h +++ b/compiler-rt/lib/ubsan/ubsan_platform.h @@ -16,7 +16,8 @@ // Other platforms should be easy to add, and probably work as-is. #if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \ (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ - defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__)) + defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \ + defined(__s390__)) # define CAN_SANITIZE_UB 1 #elif defined(_WIN32) # define CAN_SANITIZE_UB 1 |

