[lldb] Change the xcrun (fallback) logic in GetXcodeSDK#1911
Merged
fredriss merged 1 commit intoswiftlang:apple/stable/20200714from Oct 6, 2020
JDevlieghere:🍒/bastille/e3b0414b0ea305396a1fcfb2821ad643b0731880
Hidden character warning
The head ref may contain hidden characters: "\ud83c\udf52/bastille/e3b0414b0ea305396a1fcfb2821ad643b0731880"
Merged
[lldb] Change the xcrun (fallback) logic in GetXcodeSDK#1911fredriss merged 1 commit intoswiftlang:apple/stable/20200714from JDevlieghere:🍒/bastille/e3b0414b0ea305396a1fcfb2821ad643b0731880
fredriss merged 1 commit intoswiftlang:apple/stable/20200714from
JDevlieghere:🍒/bastille/e3b0414b0ea305396a1fcfb2821ad643b0731880
Conversation
This changes the logic in GetXcodeSDK to find an SDK with xcrun. The
code now executes the following steps:
1. If DEVELOPER_DIR is set in the environment, it invokes xcrun with
the given developer dir. If this fails we stop and don't fall back.
2. If the shlib dir is set and exists,it invokes xcrun with the
developer dir corresponding to the shlib dir. If this fails we fall
back to 3.
3. We run xcrun without a developer dir.
The new behavior introduced in this patch is that we fall back to
running xcrun without a developer dir if running it based on the shlib
dir failed.
A situation where this matters is when you're running lldb from an Xcode
that has no SDKs and that is not xcode-selected. Based on lldb's shlib
dir pointing into this Xcode installation, it will do an xcrun with the
developer set to the Xcode without any SDKs which will fail. With this
patch, when that happens, we'll fall back to trying the xcode-selected
Xcode by running xcrun without a developer dir.
Differential revision: https://reviews.llvm.org/D88866
(cherry picked from commit e3b0414)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the logic in GetXcodeSDK to find an SDK with xcrun. The
code now executes the following steps:
the given developer dir. If this fails we stop and don't fall back.
developer dir corresponding to the shlib dir. If this fails we fall
back to 3.
The new behavior introduced in this patch is that we fall back to
running xcrun without a developer dir if running it based on the shlib
dir failed.
A situation where this matters is when you're running lldb from an Xcode
that has no SDKs and that is not xcode-selected. Based on lldb's shlib
dir pointing into this Xcode installation, it will do an xcrun with the
developer set to the Xcode without any SDKs which will fail. With this
patch, when that happens, we'll fall back to trying the xcode-selected
Xcode by running xcrun without a developer dir.
Differential revision: https://reviews.llvm.org/D88866
(cherry picked from commit e3b0414)