Skip to content

Rethink musl-clang #684

@geofft

Description

@geofft

In both build-cpython.sh and build-zstd.sh we have some workarounds for the fact that musl-clang suppresses the vectorized math intrinsics headers that are shipped with clang. We've also had other issues with it, notably that the command name leaks out in sysconfig and end users may not have a command with that name - there are a few issues on this issue tracker and uv's.(See also discussion in an internal channel starting at https://discord.com/channels/1039017663004942429/1344040998724046920/1346959405081694350 .) Also there's no musl-clang++ and we have a # TODO: Explore a musl-clang++ shim?.

The thing that musl-clang does is relatively uncomplicated and there's probably a way to do it better. It might be as simple as adding to CPPFLAG -nostdinc --sysroot /prefix/to/musl -isystem /prefix/to/musl/include, and to LDFLAGS -static-libgcc --sysroot /prefix/to/musl -nostdlib -lc -Wl,-dynamic-linker,/lib/ld-musl-whatever.so. Or we create a custom sysroot, or something.

This would also save us some subprocesses by avoiding a shell wrapper, marginally speeding up the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions