From 3d4b363a4af838443bc134f0e9e643feaeff6496 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 25 Jul 2019 15:34:49 -0700 Subject: [PATCH] Driver: honour `-sdk` even on Darwin If `-resource-dir` is passed, it takes precedence. If the user specifies `-sdk` that should find content in that SDK. Generalise this to Darwin as well. --- lib/Driver/ToolChains.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 923be9064d266..e67ee9f52334d 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1172,7 +1172,7 @@ void ToolChain::getResourceDirPath(SmallVectorImpl &resourceDirPath, if (const Arg *A = args.getLastArg(options::OPT_resource_dir)) { StringRef value = A->getValue(); resourceDirPath.append(value.begin(), value.end()); - } else if (!getTriple().isOSDarwin() && args.hasArg(options::OPT_sdk)) { + } else if (args.hasArg(options::OPT_sdk)) { StringRef value = args.getLastArg(options::OPT_sdk)->getValue(); resourceDirPath.append(value.begin(), value.end()); llvm::sys::path::append(resourceDirPath, "usr", "lib",