Skip to content

Conversation

@adrian-prantl
Copy link
Contributor

This new option allows the Driver to pass the path to a compilation job's own binary swiftmodule artifact to the frontend. The compiler then stores this path in the debug info, to allow clients like LLDB to unambiguously know which binary Swift module belongs to which compile unit.

rdar://163302154

def module_name_EQ : Joined<["-"], "module-name=">, Flags<[FrontendOption]>,
Alias<module_name>;

def module_path : Separate<["-"], "module-path">,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this something like -debug-module-path? Even though it's just a frontend flag I think someone seeing it could easily assume it's a more general purpose option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that's better. That would also be in line with what I chose for the IRGenOption.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

This new option allows the Driver to pass the path to a compilation
job's own binary swiftmodule artifact to the frontend. The compiler
then stores this path in the debug info, to allow clients like LLDB to
unambiguously know which binary Swift module belongs to which compile
unit.

rdar://163302154
@adrian-prantl adrian-prantl changed the title [DRAFT] Add a -module-path frontend option [DRAFT] Add a -debug-module-path frontend option Oct 24, 2025
@adrian-prantl adrian-prantl changed the title [DRAFT] Add a -debug-module-path frontend option Add a -debug-module-path frontend option Oct 24, 2025
@adrian-prantl
Copy link
Contributor Author

test with swiftlang/swift-driver#2004
@swift-ci test source compatibility

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/swift-driver#2004
@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants