summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/ToolChains.h')
-rw-r--r--clang/lib/Driver/ToolChains.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h
index 6088d9617cf..fcd96f1e5c8 100644
--- a/clang/lib/Driver/ToolChains.h
+++ b/clang/lib/Driver/ToolChains.h
@@ -137,7 +137,20 @@ public:
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
virtual bool IsMathErrnoDefault() const;
+ virtual bool IsBlocksDefault() const {
+ // Blocks default to on for 10.6 (darwin10) and beyond.
+ return (DarwinVersion[0] > 9);
+ }
+ virtual bool IsObjCNonFragileABIDefault() const {
+ // Non-fragile ABI default to on for 10.5 (darwin9) and beyond on x86-64.
+ return (DarwinVersion[0] >= 9 &&
+ getTriple().getArch() == llvm::Triple::x86_64);
+ }
virtual bool IsUnwindTablesDefault() const;
+ virtual unsigned GetDefaultStackProtectorLevel() const {
+ // Stack protectors default to on for 10.6 (darwin10) and beyond.
+ return (DarwinVersion[0] > 9) ? 1 : 0;
+ }
virtual const char *GetDefaultRelocationModel() const;
virtual const char *GetForcedPicModel() const;
OpenPOWER on IntegriCloud