]> granicus.if.org Git - clang/commitdiff
[Driver] Add PPC64 as supported for Scudo
authorKostya Kortchinsky <kostyak@google.com>
Tue, 3 Jul 2018 14:39:29 +0000 (14:39 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Tue, 3 Jul 2018 14:39:29 +0000 (14:39 +0000)
Summary:
Scudo works on PPC64 as is, so mark the architecture as supported for it. This
will also require a change to config-ix.cmake on the compiler-rt side.

Update the tests accordingly.

Reviewers: eugenis, alekseyshl

Reviewed By: alekseyshl

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D48833

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336202 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Linux.cpp
test/Driver/fsanitize.c

index 9a477556cf095095e57781176aa4cbe7f82f32a7..d27f994d32abdea1b1e788e8e4423fb14e71dc66 100644 (file)
@@ -931,7 +931,8 @@ SanitizerMask Linux::getSupportedSanitizers() const {
     Res |= SanitizerKind::Efficiency;
   if (IsX86 || IsX86_64)
     Res |= SanitizerKind::Function;
-  if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsMIPS || IsArmArch)
+  if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsMIPS || IsArmArch ||
+      IsPowerPC64)
     Res |= SanitizerKind::Scudo;
   if (IsX86_64 || IsAArch64) {
     Res |= SanitizerKind::HWAddress;
index 98fd1636b729163f4eb5a7ef6588b634e2cf1809..354e7c029699850597c11ac61170c2b27430b979 100644 (file)
 // RUN: %clang -target mips64el-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
 // RUN: %clang -target mips-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
 // RUN: %clang -target mipsel-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
+// RUN: %clang -target powerpc64-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
+// RUN: %clang -target powerpc64le-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO
 // CHECK-SCUDO: "-fsanitize=scudo"
 
 // RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE