summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-10-26 20:59:04 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-10-26 20:59:04 +0000
commite4b9ae666e57c26d4d545abbf85883aad23d34a2 (patch)
treec956d8df1b55a98582af63d68f56e5cfa2eae5dd
parent01ebd9b7f70213b82e4d4c6e1a33a76a94f77028 (diff)
downloadbcm5719-llvm-e4b9ae666e57c26d4d545abbf85883aad23d34a2.tar.gz
bcm5719-llvm-e4b9ae666e57c26d4d545abbf85883aad23d34a2.zip
[LSan] Enable LSan tests on PPC64 Linux.
Summary: LSan is functional on PPC64 Linux now, let's enable all tests. One test required ppc specific changes: use_registers.cc. Reviewers: eugenis Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D39316 llvm-svn: 316698
-rw-r--r--compiler-rt/cmake/config-ix.cmake2
-rw-r--r--compiler-rt/test/lsan/TestCases/use_registers.cc5
-rw-r--r--compiler-rt/test/lsan/lit.common.cfg2
3 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index e4976ce6d89..30b308131f4 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -199,7 +199,7 @@ set(ALL_FUZZER_SUPPORTED_ARCH x86_64)
if(APPLE)
set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
else()
- set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64} ${ARM32})
+ set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64} ${ARM32} ${PPC64})
endif()
set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64}
diff --git a/compiler-rt/test/lsan/TestCases/use_registers.cc b/compiler-rt/test/lsan/TestCases/use_registers.cc
index 5d5ede5cec8..edcf1ae1631 100644
--- a/compiler-rt/test/lsan/TestCases/use_registers.cc
+++ b/compiler-rt/test/lsan/TestCases/use_registers.cc
@@ -38,6 +38,11 @@ void *registers_thread_func(void *arg) {
:
: "r" (p)
);
+#elif defined(__powerpc__)
+ asm ( "mr 30, %0"
+ :
+ : "r" (p)
+ );
#else
#error "Test is not supported on this architecture."
#endif
diff --git a/compiler-rt/test/lsan/lit.common.cfg b/compiler-rt/test/lsan/lit.common.cfg
index 610b1b1ad95..a5df951e2e0 100644
--- a/compiler-rt/test/lsan/lit.common.cfg
+++ b/compiler-rt/test/lsan/lit.common.cfg
@@ -68,7 +68,7 @@ config.substitutions.append( ("%clang_lsan ", build_invocation(clang_lsan_cflags
config.substitutions.append( ("%clangxx_lsan ", build_invocation(clang_lsan_cxxflags)) )
# LeakSanitizer tests are currently supported on x86-64 Linux, PowerPC64 Linux, arm Linux, mips64 Linux, and x86_64 Darwin.
-supported_linux = config.host_os is 'Linux' and config.host_arch in ['x86_64', 'ppc64', 'mips64', 'arm', 'armhf', 'armv7l']
+supported_linux = config.host_os is 'Linux' and config.host_arch in ['x86_64', 'ppc64', 'ppc64le', 'mips64', 'arm', 'armhf', 'armv7l']
supported_darwin = config.host_os is 'Darwin' and config.target_arch is 'x86_64'
if not (supported_linux or supported_darwin):
config.unsupported = True
OpenPOWER on IntegriCloud