diff options
author | Derek Schuff <dschuff@google.com> | 2015-03-26 21:58:46 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2015-03-26 21:58:46 +0000 |
commit | a3b594c480166f4c91ee488d85cfc4767566fee7 (patch) | |
tree | b914fbe4dc593237e7baf6fcbb1eb05a462e4edf /llvm/lib/Support/Triple.cpp | |
parent | 346048a1fa469dde8d1b3205c37ea40cc1377495 (diff) | |
download | bcm5719-llvm-a3b594c480166f4c91ee488d85cfc4767566fee7.tar.gz bcm5719-llvm-a3b594c480166f4c91ee488d85cfc4767566fee7.zip |
Default to armv7 cpu for NaCl when march=arm
Summary:
When the arch is given as "arm" clang uses the default target CPU from
LLVM to determine what the real arch should be (i.e. "arm" becomes
"armv4t" because LLVM's getARMCPUForArch falls back to "arm7tdmi").
Default to "cortex-a8" so that we end up with "armv7" in clang.
the nacl-direct.c test in clang also covers this case.
Differential Revision: http://reviews.llvm.org/D8589
llvm-svn: 233321
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r-- | llvm/lib/Support/Triple.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index e9a22429883..d4b150a6cb1 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -1137,6 +1137,8 @@ const char *Triple::getARMCPUForArch(StringRef MArch) const { default: return "strongarm"; } + case llvm::Triple::NaCl: + return "cortex-a8"; default: switch (getEnvironment()) { case llvm::Triple::EABIHF: |