rules_zig
rules_zig copied to clipboard
Support a custom libc configuration file
See https://github.com/aherrmann/rules_zig/issues/161#issuecomment-1872501510.
Zig links against its own libc. However, this is configurable. You can either select one of the builtin libc's by adjusting the ABI part of the target triple in a custom target toolchain. Or, in principle Zig can also accept a custom libc configuration, which could also be exposed through a target toolchain attribute.
--libc [file] Provide a file which specifies libc paths
Add an optional libc
attribute to the target toolchain rule. When set the --libc
flag will be passed to the Zig compiler accordingly.