summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-04-29 17:53:00 +0000
committerChris Bieneman <beanz@apple.com>2016-04-29 17:53:00 +0000
commit46977b62aaaca7a5853a6e3eeabc0adc8f53ef32 (patch)
treecc3c2f0e2d0a92c044d1a03387f3bef611395a41 /clang/lib/Basic/Targets.cpp
parentfb4f2fedd1e4402f1d8a933813c2addb83d07e24 (diff)
downloadbcm5719-llvm-46977b62aaaca7a5853a6e3eeabc0adc8f53ef32.tar.gz
bcm5719-llvm-46977b62aaaca7a5853a6e3eeabc0adc8f53ef32.zip
[Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI
Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build. Reviewers: t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D19693 llvm-svn: 268078
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index e2a9292dd0b..0a87cdf061e 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -208,6 +208,10 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
if (Triple.isOSDarwin())
Builder.defineMacro("__MACH__");
+ // The Watch ABI uses Dwarf EH.
+ if(Triple.isWatchABI())
+ Builder.defineMacro("__ARM_DWARF_EH__");
+
PlatformMinVersion = VersionTuple(Maj, Min, Rev);
}
OpenPOWER on IntegriCloud