================
@@ -2651,6 +2639,21 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args)
const {
const std::string OSVersionStr = OSVersion.getAsString();
// Set the tool chain target information.
if (Platform == MacOS) {
+#ifdef CLANG_USE_XCSELECT
+ // If we don't have an SDK yet and are on macOS, try to inject one using
+ // xcselect, except when passed --no-xcselect.
+ if (!Args.hasArg(options::OPT_no_xcselect) &&
+ !Args.getLastArg(options::OPT_isysroot) && !::getenv("SDKROOT") &&
----------------
cachemeifyoucan wrote:
I am slightly prefer carry a bool flag from logics above so it is easier to
maintain. People might forget to update this logic when they update SDKROOT
setting logic above so it is better to have a single source of truth for if sdk
is set or not.
https://github.com/llvm/llvm-project/pull/186683
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits