This is an archive of the discontinued LLVM Phabricator instance.

[clang] Capture Framework when HeaderSearch is resolved via headermap
ClosedPublic

Authored by cishida on Oct 8 2021, 4:06 PM.

Details

Summary

When building frameworks, headermaps responsible for mapping angle-included headers to their source file location are passed via
-I and not -index-header-map. Also, -index-header-map is only used for indexing purposes and not during most builds.
This patch holds on to the framework's name in HeaderFileInfo as this is retrieveable for cases outside of IndexHeaderMaps and
still represents the framework that is being built.

resolves: rdar://84046893

Diff Detail

Event Timeline

cishida requested review of this revision.Oct 8 2021, 4:06 PM
cishida created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2021, 4:06 PM
cishida edited the summary of this revision. (Show Details)Oct 8 2021, 4:13 PM
dexonsmith added a subscriber: jansvoboda11.

@jansvoboda11, can you help to review this?

cishida updated this revision to Diff 379721.Oct 14 2021, 7:57 AM

Fix windows build.

jansvoboda11 accepted this revision.Oct 15 2021, 7:33 AM

LGTM.

As a follow-up, do you think it would make sense to improve the documentation/comments around "index header maps"? Variable names refer to indexing while the documentation talks about building frameworks, which is confusing without referring back to the original Radar.

This revision is now accepted and ready to land.Oct 15 2021, 7:33 AM

LGTM.

As a follow-up, do you think it would make sense to improve the documentation/comments around "index header maps"? Variable names refer to indexing while the documentation talks about building frameworks, which is confusing without referring back to the original Radar.

Makes sense to me. If I understand correctly, the headermap kind was introduced to work around a task generation limitation in Xcode which no longer is an issue.

This revision was landed with ongoing or failed builds.Oct 15 2021, 9:18 AM
This revision was automatically updated to reflect the committed changes.