summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2016-01-12 23:47:59 +0000
committerFrederic Riss <friss@apple.com>2016-01-12 23:47:59 +0000
commit3ad83bd3845a84f54af7a2dadff4473a2bbc642f (patch)
treec410fa9afb3b63e80c9c685404d5ec649ba6fc3e /clang/lib/Driver/ToolChains.cpp
parentdb7824f0c1e5fc230faedb2869bc6033fe213500 (diff)
downloadbcm5719-llvm-3ad83bd3845a84f54af7a2dadff4473a2bbc642f.tar.gz
bcm5719-llvm-3ad83bd3845a84f54af7a2dadff4473a2bbc642f.zip
[Darwin] Fix deployment target detection
There was a thinko in the deployment target detection code that made the -isysroot parsing have precedence over the environment variable for tvOS. This patch makes this logic symetric for all platforms (the env variable must have precedence). llvm-svn: 257543
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index b9768a42fdf..beede2e0580 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -526,7 +526,7 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
// no environment variable defined, see if we can set the default based
// on -isysroot.
if (OSXTarget.empty() && iOSTarget.empty() && WatchOSTarget.empty() &&
- Args.hasArg(options::OPT_isysroot)) {
+ TvOSTarget.empty() && Args.hasArg(options::OPT_isysroot)) {
if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) {
StringRef isysroot = A->getValue();
// Assume SDK has path: SOME_PATH/SDKs/PlatformXX.YY.sdk
OpenPOWER on IntegriCloud