-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Explicit Module Builds] Initialize ClangImporter
's CodeGenerator
using Swift compilation Target Triple.
#70564
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bigcheese
approved these changes
Mar 5, 2024
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.
The actual change looks correct, just a comment on the test.
80ad328
to
f3d4a64
Compare
f3d4a64
to
26bf106
Compare
…sing Swift compilation Target Triple. As per swiftlang#65930, the Clang importer's Clang instance may be configured with a different (higher) OS version than the compilation target itself in order to be able to load pre-compiled Clang modules that are aligned with the broader SDK, and match the SDK deployment target against which Swift modules are also built. Code-generation, however, must use the actual compilation target triple. This matches how Swift itself loads Swift module dependencies as well: dependency '.swiftinterface' files are type-checked against the availability epoch and code-generated against the actual compilation triple. Resolves rdar://113712186
26bf106
to
0fbbba5
Compare
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 25, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 28, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 28, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 28, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 30, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
Apr 30, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
May 1, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
artemcm
added a commit
to artemcm/swift
that referenced
this pull request
May 1, 2025
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per #65930, the Clang importer's Clang instance may be configured with a different (higher) OS version than the compilation target itself in order to be able to load pre-compiled Clang modules that are aligned with the broader SDK, and match the SDK deployment target against which Swift modules are also built. Code-generation, however, must use the actual compilation target triple. This matches how Swift itself loads Swift module dependencies as well: dependency
.swiftinterface
files are type-checked against the availability epoch and code-generated against the actual compilation triple.Resolves rdar://113712186