From: Bob Wilson Date: Fri, 10 Oct 2014 03:12:15 +0000 (+0000) Subject: Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95c9b8e2681472d37bd06c6364f8bd6e71eb5401;p=clang Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var. It turns out that this was never used. Instead we just use the IPHONEOS_DEPLOYMENT_TARGET variable for both iOS devices and simulator. rdar://problem/18596744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219467 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index f0920a8e16..24524c84f1 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -102,8 +102,6 @@ def err_drv_cc_print_options_failure : Error< "unable to open CC_PRINT_OPTIONS file: %0">; def err_drv_preamble_format : Error< "incorrect format for -preamble-bytes=N,END">; -def err_drv_conflicting_deployment_targets : Error< - "conflicting deployment targets, both '%0' and '%1' are present in environment">; def err_drv_invalid_arch_for_deployment_target : Error< "invalid architecture '%0' for deployment target '%1'">; def err_drv_objc_gc_arr : Error< diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index a657c07a79..384b995386 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -474,13 +474,10 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // environment defines. StringRef OSXTarget; StringRef iOSTarget; - StringRef iOSSimTarget; if (char *env = ::getenv("MACOSX_DEPLOYMENT_TARGET")) OSXTarget = env; if (char *env = ::getenv("IPHONEOS_DEPLOYMENT_TARGET")) iOSTarget = env; - if (char *env = ::getenv("IOS_SIMULATOR_DEPLOYMENT_TARGET")) - iOSSimTarget = env; // If no '-miphoneos-version-min' specified on the command line and // IPHONEOS_DEPLOYMENT_TARGET is not defined, see if we can set the default @@ -503,18 +500,6 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { MachOArchName == "arm64")) iOSTarget = iOSVersionMin; - // Handle conflicting deployment targets - // - // FIXME: Don't hardcode default here. - - // Do not allow conflicts with the iOS simulator target. - if (!iOSSimTarget.empty() && (!OSXTarget.empty() || !iOSTarget.empty())) { - getDriver().Diag(diag::err_drv_conflicting_deployment_targets) - << "IOS_SIMULATOR_DEPLOYMENT_TARGET" - << (!OSXTarget.empty() ? "MACOSX_DEPLOYMENT_TARGET" : - "IPHONEOS_DEPLOYMENT_TARGET"); - } - // Allow conflicts among OSX and iOS for historical reasons, but choose the // default platform. if (!OSXTarget.empty() && !iOSTarget.empty()) { @@ -534,11 +519,6 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { const Option O = Opts.getOption(options::OPT_miphoneos_version_min_EQ); iOSVersion = Args.MakeJoinedArg(nullptr, O, iOSTarget); Args.append(iOSVersion); - } else if (!iOSSimTarget.empty()) { - const Option O = Opts.getOption( - options::OPT_mios_simulator_version_min_EQ); - iOSSimVersion = Args.MakeJoinedArg(nullptr, O, iOSSimTarget); - Args.append(iOSSimVersion); } else if (MachOArchName != "armv6m" && MachOArchName != "armv7m" && MachOArchName != "armv7em") { // Otherwise, assume we are targeting OS X. diff --git a/test/lit.cfg b/test/lit.cfg index cf03129d92..a435bf582d 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -73,7 +73,6 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) # safe_env_vars = ('TMPDIR', 'TEMP', 'TMP', 'USERPROFILE', 'PWD', # 'MACOSX_DEPLOYMENT_TARGET', 'IPHONEOS_DEPLOYMENT_TARGET', -# 'IOS_SIMULATOR_DEPLOYMENT_TARGET', # 'VCINSTALLDIR', 'VC100COMNTOOLS', 'VC90COMNTOOLS', # 'VC80COMNTOOLS') possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS',