Skip to content

fix: support the Swift Static Linux SDK (musl) - #1168

Open
sabafshin wants to merge 1 commit into
tuist:mainfrom
sabafshin:musl-static-sdk
Open

fix: support the Swift Static Linux SDK (musl)#1168
sabafshin wants to merge 1 commit into
tuist:mainfrom
sabafshin:musl-static-sdk

Conversation

@sabafshin

Copy link
Copy Markdown

Resolves #1167

Short description 📝

Make XcodeProj buildable with the Swift Static Linux SDK (musl): use Musl.glob via canImport(Musl) and drop the GNU-only GLOB_BRACE flag on musl.

Solution 📦

The musl libc is exposed as the Musl module (not Glibc) and musl's glob() has no brace expansion. Add an additive #if os(Linux) && canImport(Musl) branch in systemGlob and guard the flags. Behavior on glibc/macOS is unchanged — same pattern already merged upstream in jpsim/Yams (PR #477).

Implementation 👩‍💻👨‍💻

Detail in a checklist the steps that you took to implement the PR.

  • canImport(Musl) branch in systemGlobMusl.glob
  • Guard GLOB_BRACE out on musl only
  • Verified swift build --swift-sdk x86_64-swift-linux-musl succeeds
  • Verified glibc/macOS paths untouched (existing CI covers them)

The Swift Static Linux SDK (musl) exposes libc as the Musl module, not
Glibc. Use canImport(Musl) for the glob call, and drop GLOB_BRACE on
musl (GNU extension absent from musl glob.h). Unchanged on glibc/macOS.

(cherry picked from commit 2b6338a)
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 7, 2026
@sabafshin

Copy link
Copy Markdown
Author

@pepicrft — small additive fix for building XcodeProj with the official Swift Static Linux SDK (musl): canImport(Musl) branch in systemGlob and dropping the GNU-only GLOB_BRACE on musl. glibc/macOS paths untouched; same pattern already merged in jpsim/Yams (PR #477). Would appreciate a review when you have a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support building with the Swift Static Linux SDK (musl)

1 participant