This is the "COROOT" — files in this directory are used by compis at runtime and are bundled with the distribution (in the same directory as the compis executable, sans "lib/".)
Overview:
clangrescontains clang resources like SIMD headers. It is automatically included by compis for C source files and by thecccommand.cocontains headers used by compis C sources.darwincontains system library.tbdindex files for macOS. These are used by the linker when targetingmacos.librtcontains the "builtins" runtime library, automatically built and included for compis andcclinking.muslcontains sources and headers for musl, the Linux libc used forlinuxtargetssysinccontains system headers.sysincis not checked into git, but is generated fromsysinc-src.sysinc-srcis compiled to a more compact format assysinc, which is what is actually included in distributions. During development,build.shis responsible for building thesysincas needed. (sysincis not checked in to git since it is generated.)wasicontains sources for libc (and libwasi-*) for the WASI platform.
Note: libc and librt are not used if -nostdlib is provided to cc.
etc/update-clangres.sh etc/update-librt.sh etc/update-musl.sh Note: public musl headers reside at musl/include rather than in sysinc. It's separated like this since it's possible to compile for linux without libc.
You need to run this script on both an x86_64 mac and an arm one since headers are resolved by clang.
Manual first steps:
- Download all SDKs you'd like to import from https://developer.apple.com/download/all/?q=command%20line Note that you can search for specific OS versions, e.g. https://developer.apple.com/download/all/?q=command%20line%2010.13
- Mount all downloaded disk images, so that you have e.g. "/Volumes/Command Line Developer Tools"
- Run this script:
etc/update-macos-libs-and-headers.sh Needs to run on a Linux host (any distro, any arch)
etc/update-linux-headers.sh etc/update-wasi.sh