aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
commitb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (patch)
tree60a1694bec5a44d15456acc880cb2f91619f66aa /lib/Driver/ToolChains.h
parent8f57cb0305232cb53fff00ef151ca716766f3437 (diff)
downloadsrc-b3d5a323a5ca92ea73443499cee2f15db1ff0fb3.tar.gz
src-b3d5a323a5ca92ea73443499cee2f15db1ff0fb3.zip
Notes
Diffstat (limited to 'lib/Driver/ToolChains.h')
-rw-r--r--lib/Driver/ToolChains.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 6088d9617cf0..fcd96f1e5c8c 100644
--- a/lib/Driver/ToolChains.h
+++ b/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;