[PATCH] D39316: [LSan] Enable LSan tests on PPC64 Linux.

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 20:32:22 PDT 2017


alekseyshl created this revision.
Herald added a subscriber: mgorny.

LSan is functional on PPC64 Linux now, let's enable all tests.

One test required ppc specific changes: use_registers.cc.


https://reviews.llvm.org/D39316

Files:
  cmake/config-ix.cmake
  test/lsan/TestCases/use_registers.cc
  test/lsan/lit.common.cfg


Index: test/lsan/lit.common.cfg
===================================================================
--- test/lsan/lit.common.cfg
+++ test/lsan/lit.common.cfg
@@ -68,7 +68,7 @@
 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
Index: test/lsan/TestCases/use_registers.cc
===================================================================
--- test/lsan/TestCases/use_registers.cc
+++ test/lsan/TestCases/use_registers.cc
@@ -38,6 +38,11 @@
       :
       : "r" (p)
       );
+#elif defined(__powerpc__)
+  asm ( "mr 30, %0"
+      :
+      : "r" (p)
+      );
 #else
 #error "Test is not supported on this architecture."
 #endif
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -199,7 +199,7 @@
 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}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39316.120355.patch
Type: text/x-patch
Size: 1787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/c9235d13/attachment.bin>


More information about the llvm-commits mailing list