aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-26 16:23:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-26 16:23:12 +0000
commit02633b541b04ad5ffc1c70f4c2feeeb13e607057 (patch)
tree005d8c3448d2cd9002babf3a4da10c9dffbe5c3a /lib/Driver/ToolChains.h
parent9d9963e73045ffc0fb9982633fa0bac3af14112e (diff)
Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation in new driver git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.h')
-rw-r--r--lib/Driver/ToolChains.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 7548b9ec53..5e7bdb5f7b 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -56,7 +56,11 @@ class VISIBILITY_HIDDEN Darwin_X86 : public ToolChain {
/// The directory suffix for this tool chain.
std::string ToolChainDir;
- std::string getMacosxVersionMin() const;
+ /// The default macosx-version-min of this tool chain; empty until
+ /// initialized.
+ mutable std::string MacosxVersionMin;
+
+ const char *getMacosxVersionMin() const;
public:
Darwin_X86(const HostInfo &Host, const char *Arch, const char *Platform,
@@ -64,6 +68,26 @@ public:
const unsigned (&GCCVersion)[3]);
~Darwin_X86();
+ void getDarwinVersion(unsigned (&Res)[3]) const {
+ Res[0] = DarwinVersion[0];
+ Res[1] = DarwinVersion[1];
+ Res[2] = DarwinVersion[2];
+ }
+
+ void getMacosxVersion(unsigned (&Res)[3]) const {
+ Res[0] = 10;
+ Res[1] = DarwinVersion[0] - 4;
+ Res[2] = DarwinVersion[1];
+ }
+
+ const char *getMacosxVersionStr() const {
+ return MacosxVersionMin.c_str();
+ }
+
+ const std::string &getToolChainDir() const {
+ return ToolChainDir;
+ }
+
virtual DerivedArgList *TranslateArgs(InputArgList &Args) const;
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
@@ -72,9 +96,6 @@ public:
virtual bool IsUnwindTablesDefault() const;
virtual const char *GetDefaultRelocationModel() const;
virtual const char *GetForcedPicModel() const;
-
-private:
- const std::string &getToolChainDir() const { return ToolChainDir; }
};
/// Darwin_GCC - Generic Darwin tool chain using gcc.