================ @@ -581,6 +626,21 @@ static bool ResolveAndVerifyCandidateSupportDir(FileSpec &path) { "XcodeSDK not specified"); XcodeSDK sdk = *options.XcodeSDKSelection; auto key = sdk.GetString(); + + // xcrun doesn't search SDKs in the CommandLineTools (CLT) directory. So if + // a program was compiled against a CLT SDK, but that SDK wasn't present in + // any of the Xcode installations, then xcrun would fail to find the SDK + // (which is expensive). To avoid this we first try to find the specified SDK + // in the CLT directory. + auto clt_root_dir = find_cached_path(g_sdk_path, g_sdk_path_mutex, key, [&] { + return GetCommandLineToolsSDKRoot(sdk.GetVersion()); ---------------- JDevlieghere wrote:
Does this mean we're going to prefer the CommandLineTools SDK over the Xcode one when both exist? I know they should be the same, but I'd really prefer to avoid the CLT whenever we can. https://github.com/llvm/llvm-project/pull/128712 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits