Skip to content

Conversation

@al45tair
Copy link
Contributor

@al45tair al45tair commented May 7, 2024

We need to declare separate top-level modules for every header in the musl C library. Note that our set-up here does require some tweaks to musl itself (specifically, the alltypes.h header needs some fairly serious massaging to make it module compatible; in particular, we need to pull out every type declaration into its own separate modularized header in bits/types).

Also update Platform.swift a little for more musl support.

rdar://123503615

al45tair added 2 commits May 7, 2024 21:20
We need to declare separate top-level modules for every header in
the musl C library.  Note that our set-up here does require some
tweaks to musl itself (specifically, the `alltypes.h` header needs
some fairly serious massaging to make it module compatible; in
particular, we need to pull out every type declaration into its
own separate modularized header in `bits/types`).

Also update `Platform.swift` a little for more musl support.

rdar://123503615
Added the _modules workaround to make the compiler pull in the correct
module when someone does `import stdc_assert` (for instance).

Fix various niggles.

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

al45tair commented May 7, 2024

@swift-ci Please test

The Darwin headers have a naming convention for these modules; we should
match it.

rdar://123503615
@al45tair
Copy link
Contributor Author

al45tair commented May 7, 2024

Explanation: This adds the modulemap and header for musl.
Original PR: #71840
Risk: Low. Adds new files for musl that aren't used by other platforms.
Reviewed by: @ian-twilightcoder
Resolves: rdar://123503615
Tests: There are no tests that cover this yet. There will be coverage in the CI for the fully static SDK when it's up.

@al45tair
Copy link
Contributor Author

al45tair commented May 7, 2024

@swift-ci Please test

@al45tair
Copy link
Contributor Author

al45tair commented May 8, 2024

@swift-ci Please test macOS platform

@al45tair al45tair merged commit a88da4d into swiftlang:release/6.0 May 8, 2024
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