diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-18 17:40:15 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-18 17:40:15 +0000 |
commit | c19981c2711c9b0564bc1a9cbad4b2d0cca608d5 (patch) | |
tree | 1240e7b843dda67ac7ac16a1800c2810495f5409 /lib/Driver/ToolChains.cpp | |
parent | 7a81e41a5e92dad2dd2a4edf27960c5d7f9c8063 (diff) |
[driver] Make the driver to link the simulator arclite lib when passing -mios-simulator-version-min.
rdar://10218700
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 825a83d8b8..dd92266ec6 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -371,9 +371,11 @@ void DarwinClang::AddLinkARCArgs(const ArgList &Args, P.appendComponent("libarclite_"); std::string s = P.str(); // Mash in the platform. - if (isTargetIPhoneOS()) + if (isTargetIOSSimulator()) + s += "iphonesimulator"; + else if (isTargetIPhoneOS()) s += "iphoneos"; - // FIXME: isTargetIphoneOSSimulator() is not returning true. + // FIXME: Remove this once we depend fully on -mios-simulator-version-min. else if (ARCRuntimeForSimulator != ARCSimulator_None) s += "iphonesimulator"; else @@ -495,7 +497,7 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // '-miphoneos-version-min' to help us know whether there is an ARC runtime // or not; try to parse a __IPHONE_OS_VERSION_MIN_REQUIRED // define passed in command-line. - if (!iOSVersion) { + if (!iOSVersion && !iOSSimVersion) { for (arg_iterator it = Args.filtered_begin(options::OPT_D), ie = Args.filtered_end(); it != ie; ++it) { StringRef define = (*it)->getValue(Args); |