[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment
Bob Wilson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 9 21:26:14 PST 2017
bob.wilson requested changes to this revision.
bob.wilson added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Driver/ToolChains/Darwin.cpp:1518-1523
+ // Warn about superfluous OS_DEPLOYMENT_TARGET environment variable.
+ Optional<DarwinPlatform> EnvTarget =
+ getDeploymentTargetFromEnvironmentVariables(getDriver(), getTriple());
+ if (EnvTarget)
+ getDriver().Diag(clang::diag::warn_drv_unused_environment_variable)
+ << EnvTarget->getAsString(Args, Opts);
----------------
I don't think there should be a warning in this case. It is common (at least within Apple) to set the environment variable as a default but then override it for some cases. Warning would be really annoying, and for anyone using -Werror it will break their builds.
Repository:
rC Clang
https://reviews.llvm.org/D40998
More information about the cfe-commits
mailing list