Skip to content

Provide static glibc implementation in Zig #23828

@alexrp

Description

@alexrp

This is an extension of #2879.

It's unlikely that we'd ever ship the full glibc code for static linking, partially because of license concerns, partially because some glibc subsystems call dlopen internally, and partially because the glibc source tree is frankly very bloated.

What we can do, though, is implement the glibc API surface in Zig as part of the #2879 effort. By doing so, users would be able to zig build-exe -static -lc -target ...-gnu, but without the license issues and without the caveats that usually apply when linking glibc statically, such as the internal use of dlopen.

Prior art: https://github.com/sunfishcode/mustang

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.libcIssues related to libzigc and Zig's vendored libc code.os-linuxLinux

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions