Skip to content

[ClangImporter] -Xclang -fbuiltin-headers-in-system-modules is being passed when it shouldn't #73815

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
May 22, 2024

Conversation

al45tair
Copy link
Contributor

We were accidentally setting requiresBuiltinHeadersInSystemModules because the else here gets executed for things that are not WASI or Musl. Fix by making it conditional.

rdar://128219177

…g passed when it shouldn't

We were accidentally setting `requiresBuiltinHeadersInSystemModules` because
the `else` here gets executed for things that are not WASI or Musl.  Fix
by making it conditional.

rdar://128219177
@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels May 22, 2024
@al45tair al45tair requested a review from a team as a code owner May 22, 2024 08:22
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair
Copy link
Contributor Author

al45tair commented May 22, 2024

Explanation: We had accidentally turned on -fbuiltin-headers-in-system-modules in some cases without meaning to; this was missed both when writing the code and during review because the getLibcFileMapping() function tests the triple and fails if it isn't one that needs a module map overlay, which means that although not obvious, the else branch is executed for things that are not Linux.
Original PR: #73814
Risk: Low.
Reviewed by: @egorzhdan
Resolves: rdar://128219177
Tests: This is exercised by existing tests, though OSS PR and CI testing wouldn't have picked up the problem here at this point.

@al45tair al45tair merged commit fe25355 into swiftlang:release/6.0 May 22, 2024
5 checks passed
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.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants