zhaozg / fetch-them-macos-headers

A simplistic utility for fetching minimal macOS libc headers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fetch-them-macos-headers

This is a small, simplistic utility that can be used to fetch and copy over a standard set of libc headers as described here on macOS. The intention for this utility is to use it to update the libc headers shipped with Zig, and used when cross-compiling to macOS (see this article for an amazing description of the zig cc C compiler frontend).

Howto

Building is straightforward, although I should point out, with the current limitations of the lld linker, you should build the project natively on macOS

zig build

Running the generated binary fetch_them_macos_headers will create a new dir x86_64-macos-gnu with all libc headers copied over

zig-cache/bin/fetch_them_macos_headers [cflags]

Currently there are no known cflags needed.

About

A simplistic utility for fetching minimal macOS libc headers

License:MIT License


Languages

Language:Zig 53.7%Language:C 46.3%