zig icon indicating copy to clipboard operation
zig copied to clipboard

add precompiled c/c++ header support to zig build

Open xxxbxxx opened this issue 1 year ago • 12 comments

It gets my c++ project full rebuild time from

real	10m13.212s
user	139m23.711s
sys	12m1.938s

to

real	4m52.636s
user	64m52.851s
sys	5m59.472s

pch are a little bit different from other compile steps:

  • like binary object files they are built by the C compiler from a (single) source header file.
  • however, unlike binary object files, they are not to be fed to the linker, but as a companion source file to subsequent C compiles.

xxxbxxx avatar Nov 10 '23 14:11 xxxbxxx