[Lldb-commits] [PATCH] D88866: [lldb] Add another fallback to GetXcodeSDK

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 5 21:10:25 PDT 2020


JDevlieghere added a comment.

In D88866#2313371 <https://reviews.llvm.org/D88866#2313371>, @aprantl wrote:

> So this is adding a fallback that ignores DEVELOPER_DIR if it is set, but doesn't exist? Is that really desirable, or am I misunderstanding the patch? I would expect LLDB to fail hard if the DEVELOPER_DIR in the environment is wrong and not silently ignore it...

It's slightly more subtle than that, it falls back to running `xcrun` without a developer dir if we couldn't find the desired SDK with the developer dir set. It doesn't mean the developer dir is invalid or doesn't exist, it just means we couldn't find the SDK there. Imagine for the sake of argument that you're running an Xcode that has no SDKs and that this Xcode is not `xcode-select`ed. Based on lldb's location in LLDB.framework it will do an `xcrun` with the developer set to the Xcode without any SDKs and that will fail. With this patch, when that happens, we'll fall back to trying the `xcode-select`ed by running `xcrun` without a developer dir specified. I know it sounds like a contrived example but that's exactly what I was running into...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88866/new/

https://reviews.llvm.org/D88866



More information about the lldb-commits mailing list