diff options
author | Simon Dardis <simon.dardis@mips.com> | 2018-01-25 10:09:33 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@mips.com> | 2018-01-25 10:09:33 +0000 |
commit | 0b990c5f6a4426f90377ad0ab9b642570130df62 (patch) | |
tree | 5f249ebea4ad15aa7c8fcb9ae21f52cfa53484f9 | |
parent | 9b3c7c66fc0617bab314eeadf50673960c1515db (diff) |
[Driver] Add support for mips32 and scudolinaro-local/diana.picus/VerboseISel
r317337 missed that scudo is supported on MIPS32, so permit that option for
MIPS32.
Reviewers: cryptoad, atanasyan
Differential Revision: https://reviews.llvm.org/D42416
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323412 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains/Linux.cpp | 4 | ||||
-rw-r--r-- | test/Driver/fsanitize.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp index 9ce2407d99..4e9d0f1f9f 100644 --- a/lib/Driver/ToolChains/Linux.cpp +++ b/lib/Driver/ToolChains/Linux.cpp @@ -846,6 +846,8 @@ bool Linux::isPIEDefault() const { SanitizerMask Linux::getSupportedSanitizers() const { const bool IsX86 = getTriple().getArch() == llvm::Triple::x86; const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64; + const bool IsMIPS = getTriple().getArch() == llvm::Triple::mips || + getTriple().getArch() == llvm::Triple::mipsel; const bool IsMIPS64 = getTriple().getArch() == llvm::Triple::mips64 || getTriple().getArch() == llvm::Triple::mips64el; const bool IsPowerPC64 = getTriple().getArch() == llvm::Triple::ppc64 || @@ -875,7 +877,7 @@ SanitizerMask Linux::getSupportedSanitizers() const { Res |= SanitizerKind::Efficiency; if (IsX86 || IsX86_64) Res |= SanitizerKind::Function; - if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsArmArch) + if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsMIPS || IsArmArch) Res |= SanitizerKind::Scudo; if (IsAArch64) Res |= SanitizerKind::HWAddress; diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c index 292ad0d99c..b5a677530a 100644 --- a/test/Driver/fsanitize.c +++ b/test/Driver/fsanitize.c @@ -628,6 +628,10 @@ // RUN: %clang -target arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO // RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO // RUN: %clang -target i386-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang -target mips64-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// 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 // CHECK-SCUDO: "-fsanitize=scudo" // RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE |