-
Notifications
You must be signed in to change notification settings - Fork 353
[LLDB] Set up an explicit Swift module loader #11834
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
base: stable/21.x
Are you sure you want to change the base?
Conversation
and populate it with explicitly specified Swift modules. This change allows LLDB to precisely load the explicitly built main module belonging to the current CU from disk. The mere presence of an ESML also recursively enables the same behavior for all of its dependencies, since that functionality is already implemented in the Swift compiler. This fixes a performance cliff encountered when debugging with dSYMs which contain all user modules, but none from the SDK, thus triggering an implicit build of any SDK dependencies. During the transition period this behavior can be disabled with a setting. rdar://164274588
|
@swift-ci test |
cachemeifyoucan
left a comment
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.
Mostly looks fine other than I am not sure if CAS module is loaded correctly.
| if (props.GetUseSwiftExplicitModuleLoader()) { | ||
| auto &search_path_opts = GetCompilerInvocation().getSearchPathOptions(); | ||
| std::unique_ptr<swift::ModuleLoader> esml_up = | ||
| swift::ExplicitSwiftModuleLoader::create( |
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.
Does this loader load module from CAS correctly?
So for caching build, we actually stored the explicit module map inside the CAS so the file is actually loaded from there. We can probably switch that up to use a regular file instead now (I created a special code path because the explicit module map wasn't deterministic before, but it should be now).
|
@swift-ci test windows |
|
@swift-ci test linux |
Set up an explicit Swift module loader
and populate it with explicitly specified Swift modules.
This change allows LLDB to precisely load the explicitly built main
module belonging to the current CU from disk. The mere presence of an
ESML also recursively enables the same behavior for all of its
dependencies, since that functionality is already implemented in the
Swift compiler.
This fixes a performance cliff encountered when debugging with dSYMs
which contain all user modules, but none from the SDK, thus triggering
an implicit build of any SDK dependencies.
During the transition period this behavior can be disabled with a setting.
rdar://164274588
Depends on:
#11833
swiftlang/swift#85519
swiftlang/swift-driver#2012