New features
- Windows-style line endings (
\r\n
) are now supported. - Output files with multiple generating actions is now only a warning by default, and
-w dupbuild=err
was added to change it to an error. Although this indicates a bug with the build system, there are a number of projects that don't build without this. - Escapes in dependency Makefile fragments are now supported. The escapes emitted by gcc/clang are not completely invertible, so we just do the best we can here.
- Dependency file parser is now more lenient, accepting rules where the output does not match the output of the ninja action (required by the pnacl-clang wrapper script in chromium), and extra whitespace (required by newer versions of nasm).
- Token scanner was rewritten, resulting in a cleaner API, simpler code, and better error messages.
Bug fixes
- Actions with
restat=1
,generator=1
, no build entry log, and an outdated output were incorrectly treated as not dirty. This only occurs in practice if the build log is manually removed. - Hash table could potentially drop entries with a 0 hash when it was resized (regression in 0.3).
in
member of phony edges was uninitialized, but freed if the manifest needed to be rebuilt.
Cleanups
treefind
was made iterative instead of recursive.- The deps log parser now uses just stdio instead of a weird combination of stdio and POSIX IO.
- The deps log record buffer is now allocated as needed, and is limited to
depsinit
. - POSIX APIs are now used more conservatively (favoring standard C) to make porting easier.