-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LLDB, swiftmodules xcode installers #97
Conversation
-print0 \ | ||
| xargs -0 "$BAZEL_INSTALLERS_DIR/_swiftmodule.sh" | ||
echo "Start copying swiftmodules at `date`" | ||
FOUND_SWIFTMODULES=`pcregrep -o1 'primary_output: "(.*\.swiftmodule)' $BAZEL_BUILD_EVENT_TEXT_FILENAME | uniq` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what's the difference between primary_output
and important_output
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some digging, I learned that they are the same thing, but that important_output
is deprecated:
// Temporarily, also report the important outputs directly. This is only to
// allow existing clients help transition to the deduplicated representation;
// new clients should not use it.
repeated File important_output = 4 [deprecated = true];
// Identifier of an event reporting that an action was completed (not all
// actions are reported, only the ones that can be considered important;
// this includes all failed actions).
message ActionCompletedId {
string primary_output = 1;
// Optional, the label of the owner of the action, for reference.
string label = 2;
// Optional, the id of the configuration of the action owner.
ConfigurationId configuration = 3;
}
else | ||
echo "No SWIFTMODULES found" | ||
fi | ||
echo "Finish copying swiftmodules at `date`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing newline
03e15ff
to
d3c4c2a
Compare
This PR is part of a fix for an issue where the debugger was returning the error "Cannot create Swift scratch context (couldn't load the Swift stdlib)Shared Swift state for could not be initialized" for swift code. When breakpoints were hit, it was not possible to view variables values.
This partly fixes the issue, because it tells the debugger where to find swift modules and the SDK for swift. It also fixes an issue with the logic to copy swiftmodules into derived data.
In order for debugging to work, it is also important to set the
serialize-debugging-options
flag to true for the binary (so that the AST will refer to absolute paths on the machine that built the binary.) See further discussion about Swift AST Context here: https://forums.swift.org/t/improving-path-remappings-for-extraclangargs-swiftastcontext/26886