aherrmann / rules_zig

Bazel build rules for Zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support `.c` inputs to `zig_binary|library|test`

aherrmann opened this issue · comments

Zig supports various C source type inputs. For each each such input it tracks the most recent set of -cflags ... -- surround C flags. The C files are compiled to objects using llvm and linked into the final output. Fortunately, we don't need to worry about link-order, because the Zig linker takes care of resolving dependencies either way.

  • end-to-end test
  • handle csrcs and copts
  • unit-test for copts (surrounded by -cflags ... --, if set, omitted otherwise)
  • unit-test for csrcs (all included on command-line)