Skip to content

[6.2 🍒] Modify clang declaration weakly-imported query to use Swift's code-gen target triple #81146

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

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Apr 28, 2025

Cherry-pick of #81113

Explanation: Similarly to how #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. Otherwise we end up using the clang-target os version, which may not deem the symbol as requiring being weakly-linked, which means it may fail to resolve at link time.

Issue: rdar://134820348

Risk: Low, this change causes determination of whether a Clang symbol is weakly-linked to start utilizing the correct target triple, instead of relying on the SDK type-checking os version triple. This should not affect symbols which were not supposed to be deemed as weakly-imported before and will cause the ones that were to behave correctly.

Testing: Added tests to test suite

Original PRs: #81113

Reviewers: @cachemeifyoucan

@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Apr 28, 2025
@artemcm artemcm requested a review from a team as a code owner April 28, 2025 19:21
@artemcm
Copy link
Contributor Author

artemcm commented Apr 28, 2025

@nkcsgexi
Copy link
Contributor

Thank you for cherry-picking the fix, Artem! Could you modify the PR description to be using the CCC style?

@artemcm
Copy link
Contributor Author

artemcm commented Apr 29, 2025

swiftlang/llvm-project#10568
@swift-ci test macOS platform

@artemcm
Copy link
Contributor Author

artemcm commented Apr 29, 2025

@artemcm
Copy link
Contributor Author

artemcm commented Apr 29, 2025

swiftlang/llvm-project#10568
@swift-ci test macOS platform

@artemcm artemcm force-pushed the ParameterizeWeakQueryForSwift-62 branch from 2dd9005 to 6a10d55 Compare April 30, 2025 23:45
@artemcm
Copy link
Contributor Author

artemcm commented Apr 30, 2025

swiftlang/llvm-project#10568
@swift-ci test macOS platform

…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 artemcm force-pushed the ParameterizeWeakQueryForSwift-62 branch from 6a10d55 to 4ac9119 Compare May 1, 2025 17:40
@artemcm
Copy link
Contributor Author

artemcm commented May 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants