Deps log format v3
authorNico Weber <thakis@chromium.org>
Wed, 28 Aug 2013 20:29:02 +0000 (13:29 -0700)
committerNico Weber <thakis@chromium.org>
Wed, 28 Aug 2013 20:37:12 +0000 (13:37 -0700)
commit9940196d57d46eb8aeb1cc28a57dee290034fccf
tree29c816c838eb036627e31aa6a4ccc901ef5b7c63
parentd63bd546242c26bb7c8de9da8939d75947461fee
Deps log format v3

This fixes two bugs.

1.) It makes the record size field 4 byte instead of 2, and allows a max
    record size of 512kB. This fixes #605, ninja "only" supporting 8k
    dependencies per file -- 512kB have room for 128k dependencies. (If that's
    still not enough, the current design can support at least 4x that if the
    constant is tweaked.)

2.) It makes all records 4-byte aligned, which is probably needed to make the
    `reinterpret_cast<int*>(buf)` work on SPARC (cf issue #481), and it's
    generally nicer too. (Since there's already one reinterpret_cast, convert
    a memcpy() to reinterpret_cast in another branch too).
src/deps_log.cc
src/deps_log.h