Darwin: Pass -iphoneos-version-min to ld when building for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81019 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 3d8632e..b0cc9cb 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -53,6 +53,9 @@
/// GCC version to use.
unsigned GCCVersion[3];
+ /// Whether this is this an iPhone toolchain.
+ bool IsIPhone;
+
/// The directory suffix for this tool chain.
std::string ToolChainDir;
@@ -60,12 +63,16 @@
/// initialized.
mutable std::string MacosxVersionMin;
+ /// The default iphoneos-version-min of this tool chain.
+ std::string IPhoneOSVersionMin;
+
const char *getMacosxVersionMin() const;
public:
Darwin(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3],
- const unsigned (&GCCVersion)[3]);
+ const unsigned (&DarwinVersion)[3],
+ const unsigned (&GCCVersion)[3],
+ bool IsIPhone);
~Darwin();
void getDarwinVersion(unsigned (&Res)[3]) const {
@@ -84,10 +91,16 @@
return MacosxVersionMin.c_str();
}
+ const char *getIPhoneOSVersionStr() const {
+ return IPhoneOSVersionMin.c_str();
+ }
+
const std::string &getToolChainDir() const {
return ToolChainDir;
}
+ bool isIPhone() const { return IsIPhone; }
+
virtual DerivedArgList *TranslateArgs(InputArgList &Args) const;
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;