Context π΅οΈββοΈ
The official Swift Static Linux SDK (musl) is used to produce fully-static Linux binaries. It exposes libc as the Musl module rather than Glibc, and musl's glob() lacks the GNU GLOB_BRACE extension.
Building XcodeProj with --swift-sdk *-swift-linux-musl currently fails:
Sources/XcodeProj/Extensions/Path+Extras.swift:12:16: error: cannot find 'Glibc' in scope
return Glibc.glob(pattern, flags, errfunc, vector_ptr)
^
Sources/XcodeProj/Extensions/Path+Extras.swift:38:34: error: cannot find 'GLOB_BRACE' in scope
let flags = GLOB_TILDE | GLOB_BRACE | GLOB_MARK
What π±
Add musl support to the Linux glob path in Path+Extras.swift:
canImport(Musl) branch in systemGlob β Musl.glob
- Guard
GLOB_BRACE out on musl only (GNU extension, absent from musl glob.h)
Proposal π
Same pattern already accepted upstream in jpsim/Yams (PR #477) and proposed for SwiftCLI: an additive #if os(Linux) && canImport(Musl) branch that leaves glibc/macOS behavior untouched. A ready patch exists in a fork and can be attached to the PR.
Context π΅οΈββοΈ
The official Swift Static Linux SDK (musl) is used to produce fully-static Linux binaries. It exposes libc as the
Muslmodule rather thanGlibc, and musl'sglob()lacks the GNUGLOB_BRACEextension.Building XcodeProj with
--swift-sdk *-swift-linux-muslcurrently fails:What π±
Add musl support to the Linux glob path in
Path+Extras.swift:canImport(Musl)branch insystemGlobβMusl.globGLOB_BRACEout on musl only (GNU extension, absent from musl glob.h)Proposal π
Same pattern already accepted upstream in
jpsim/Yams(PR #477) and proposed for SwiftCLI: an additive#if os(Linux) && canImport(Musl)branch that leaves glibc/macOS behavior untouched. A ready patch exists in a fork and can be attached to the PR.