diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains')
-rw-r--r-- | clang/lib/Driver/ToolChains/Darwin.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Driver/ToolChains/Darwin.h | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp index 7c401aa9dd5..2b0e59a6b59 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -1214,14 +1214,6 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { if (iOSVersion) ExplicitIOSDeploymentTargetStr = iOSVersion->getAsString(Args); - // Add a macro to differentiate between m(iphone|tv|watch)os-version-min=X.Y and - // -m(iphone|tv|watch)simulator-version-min=X.Y. - if (Args.hasArg(options::OPT_mios_simulator_version_min_EQ) || - Args.hasArg(options::OPT_mtvos_simulator_version_min_EQ) || - Args.hasArg(options::OPT_mwatchos_simulator_version_min_EQ)) - Args.append(Args.MakeSeparateArg(nullptr, Opts.getOption(options::OPT_D), - " __APPLE_EMBEDDED_SIMULATOR__=1")); - if (OSXVersion && (iOSVersion || TvOSVersion || WatchOSVersion)) { getDriver().Diag(diag::err_drv_argument_not_allowed_with) << OSXVersion->getAsString(Args) diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h index c861f172fe1..6d6493a6d1b 100644 --- a/clang/lib/Driver/ToolChains/Darwin.h +++ b/clang/lib/Driver/ToolChains/Darwin.h @@ -329,6 +329,9 @@ protected: TargetInitialized = true; TargetPlatform = Platform; TargetVersion = VersionTuple(Major, Minor, Micro); + if (Platform == IPhoneOSSimulator || Platform == TvOSSimulator || + Platform == WatchOSSimulator) + const_cast<Darwin *>(this)->setTripleEnvironment(llvm::Triple::Simulator); } bool isTargetIPhoneOS() const { |