diff options
author | Tim Northover <tnorthover@apple.com> | 2015-10-30 16:30:41 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-10-30 16:30:41 +0000 |
commit | e931f9fc0dcfeb51421b9a0faa7039bb4f9f53a7 (patch) | |
tree | a4cbf5ad544cd614d39dc59721b59375f0f9c183 /clang/lib/Driver/ToolChains.cpp | |
parent | 756447a67c39ba1e95cb5c92cbeb06f8a795b7fb (diff) | |
download | bcm5719-llvm-e931f9fc0dcfeb51421b9a0faa7039bb4f9f53a7.tar.gz bcm5719-llvm-e931f9fc0dcfeb51421b9a0faa7039bb4f9f53a7.zip |
Disable SjLj exceptions for watchOS
llvm-svn: 251709
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index b65c5c13608..43a8ff657dd 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1037,10 +1037,18 @@ bool MachO::UseDwarfDebugFlags() const { return false; } -bool Darwin::UseSjLjExceptions() const { +bool Darwin::UseSjLjExceptions(const ArgList &Args) const { // Darwin uses SjLj exceptions on ARM. - return (getTriple().getArch() == llvm::Triple::arm || - getTriple().getArch() == llvm::Triple::thumb); + if (getTriple().getArch() != llvm::Triple::arm && + getTriple().getArch() != llvm::Triple::thumb) + return false; + + // We can't check directly for watchOS here. ComputeLLVMTriple only + // fills in the ArchName correctly. + llvm::Triple Triple(ComputeLLVMTriple(Args)); + return !(Triple.getArchName() == "armv7k" || + Triple.getArchName() == "thumbv7k"); + } bool MachO::isPICDefault() const { return true; } @@ -2952,7 +2960,7 @@ Tool *FreeBSD::buildAssembler() const { Tool *FreeBSD::buildLinker() const { return new tools::freebsd::Linker(*this); } -bool FreeBSD::UseSjLjExceptions() const { +bool FreeBSD::UseSjLjExceptions(const ArgList &Args) const { // FreeBSD uses SjLj exceptions on ARM oabi. switch (getTriple().getEnvironment()) { case llvm::Triple::GNUEABIHF: |