diff options
Diffstat (limited to 'lib/Driver/HostInfo.cpp')
-rw-r--r-- | lib/Driver/HostInfo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp index 08c4ef4900..22fe11d661 100644 --- a/lib/Driver/HostInfo.cpp +++ b/lib/Driver/HostInfo.cpp @@ -42,7 +42,7 @@ class DarwinHostInfo : public HostInfo { unsigned DarwinVersion[3]; /// GCC version to use on this host. - unsigned GCCVersion[3]; + unsigned GCCVersion[4]; /// Cache of tool chains we have created. mutable llvm::DenseMap<unsigned, ToolChain*> ToolChains; @@ -84,6 +84,12 @@ DarwinHostInfo::DarwinHostInfo(const Driver &D, const llvm::Triple& Triple) GCCVersion[0] = 4; GCCVersion[1] = 2; GCCVersion[2] = 1; + // And we need to select the OS gcc was configured for, darwin10 +#ifdef OS_MAJOR + GCCVersion[3] = OS_MAJOR; +#else + GCCVersion[3] = 10; +#endif } DarwinHostInfo::~DarwinHostInfo() { |