Skip to content

Support for extracting symbols graphs for clang targets#1390

Merged
cmcgee1024 merged 5 commits into
swiftlang:mainfrom
cmcgee1024:symbol_graph_clang
May 13, 2026
Merged

Support for extracting symbols graphs for clang targets#1390
cmcgee1024 merged 5 commits into
swiftlang:mainfrom
cmcgee1024:symbol_graph_clang

Conversation

@cmcgee1024
Copy link
Copy Markdown
Member

@cmcgee1024 cmcgee1024 commented May 12, 2026

Symbol graphs are not currently generated for clang targets. The reason is that SwiftPM
generally doesn't include headers in the PIF.

Support extracting symbol graphs for these targets via TAPI. Also, provide a method to
include project visible headers in the symbol graph generation so that SwiftPM can add
the headers with minimal disruption to the existing workflow.

SwiftPM also expects to be able to place the generated symbol graphs in a directory other
than the default so provide a build setting to specify the location.

Augment the TAPI symbol extractor to read the pretty print build setting and pass it along
to clang to format the JSON in the symbol graphs.

@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

Copy link
Copy Markdown
Collaborator

@owenv owenv left a comment

Choose a reason for hiding this comment

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

This approach generally makes sense to me

Comment thread Sources/SWBCore/Settings/BuiltinMacros.swift Outdated
@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@cmcgee1024 cmcgee1024 marked this pull request as ready for review May 13, 2026 12:47
@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@cmcgee1024 cmcgee1024 merged commit ee2a41b into swiftlang:main May 13, 2026
124 of 126 checks passed
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