Skip to content

[6.2][Data] Fix build issue with Static SDK for Linux. #1294

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: main
Choose a base branch
from

Conversation

al45tair
Copy link
Contributor

Musl's definition of S_IFMT gets imported by the Swift importer, which means Swift can see S_IFMT as a CInt and also S_IFMT from the Swift overlay as a mode_t. The upshot is that attempting to convert it to mode_t produces an ambiguity error, as Swift doesn't know which definition to use.

@al45tair al45tair changed the title [Data] Fix build issue with Static SDK for Linux. [6.2][Data] Fix build issue with Static SDK for Linux. May 15, 2025
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair al45tair requested a review from parkera May 15, 2025 13:18
@al45tair
Copy link
Contributor Author

This is a cherry pick of #1293

@al45tair al45tair force-pushed the fix-static-sdk-build-6.2 branch from 6c54e5b to f275b2c Compare May 15, 2025 13:31
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair
Copy link
Contributor Author

Explanation: Fixes a build issue when building Foundation for the Static SDK for Linux.
Risk: Low. Should only affect the Static SDK for Linux.
Original PR: #1293
Reviewed by: @parkera
Resolves: rdar://147201087
Tests: With this fix, and the other associated fixes, the Static SDK for Linux build succeeds. Without them, it fails.

@parkera
Copy link
Contributor

parkera commented May 15, 2025

I'm still hoping to get a merger from main to 6.2.

Musl's definition of `S_IFMT` gets imported by the Swift importer, which
means Swift can see `S_IFMT` as a `CInt` and also `S_IFMT` from the Swift
overlay as a `mode_t`.  The upshot is that attempting to convert it to
`mode_t` produces an ambiguity error, as Swift doesn't know which
definition to use.

rdar://147201087
@al45tair al45tair force-pushed the fix-static-sdk-build-6.2 branch from f275b2c to 1b4c1d3 Compare May 16, 2025 12:31
@al45tair
Copy link
Contributor Author

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants