Skip to content

ClangImporter: correct a duplicated path component #67723

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
merged 1 commit into from
Aug 9, 2023

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Aug 3, 2023

When computing the path for a non-architecture specific resource, we would append the architecture unconditionally if -sdk is used. This would result in the path being miscomputed with the architecture or the architecture duplicated if it was architecture specific.

Found by inspection.

Explanation: Correct the location for resources relative to the SDK root
Scope: This fixes the Windows target's use of CxxShim which is required for C++ interop which would not be found otherwise.
Issue: #67715
Risk: This impacts only targets that use -sdk (Darwin, Windows). However, this can be further refined to the location of resources that are SDK relative. Darwin places the toolchain resources entirely with the toolchain and not as SDK relative like Windows, which means that those paths should technically not be impacted, though the code path is shared.
Testing: What specific testing has been done or needs to be done to further validate any impact of this change?
Reviewer: @hyp @egorzhdan

When computing the path for a non-architecture specific resource, we
would append the architecture unconditionally if `-sdk` is used.  This
would result in the path being miscomputed with the architecture or the
architecture duplicated if it was architecture specific.

Found by inspection.
@compnerd compnerd requested review from hyp and egorzhdan August 3, 2023 19:51
@compnerd compnerd requested a review from a team as a code owner August 3, 2023 19:51
@compnerd compnerd added swift 5.9 c++ interop Feature: Interoperability with C++ labels Aug 3, 2023
@compnerd
Copy link
Member Author

compnerd commented Aug 4, 2023

@swift-ci please test

Copy link
Contributor

@ravikandhadai ravikandhadai left a comment

Choose a reason for hiding this comment

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

LGTM

@compnerd compnerd merged commit ae5efe8 into swiftlang:release/5.9 Aug 9, 2023
@compnerd compnerd deleted the 59-architectures-for-none branch August 9, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants