| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
See the comment 5 lines up for details.
|
|\
| |
| | |
Simplify.
|
|/ |
|
|\
| |
| | |
Delete a line I failed to delete in d7a46654a7be1.
|
|/ |
|
|\
| |
| | |
Land the majority of pull request #608.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes issue #603.
Apparently, the problem was caused by my fix r "consider target dirty if
depfile is missing" (bcc8ad1), which was not working correctly with
restat rules cleaning nodes. Switching to deps only triggered an easily
observable issue.
Fix by setting a flag in edges with invalid deps, and not cleaning edges
with that flag set.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move a common loop into the new function RecomputeOutputsDirty().
Simplifies things a bit, and makes it harder for the restat path to have
different behavior from the regular path.
No dramatic behavior change (the restat path now also calls
RestatIfNecessary()).
|
|/
|
|
|
|
|
|
|
|
|
|
| |
RecomputeOutputDirty() is called from two places:
1. RecomputeDirty(), which calls LoadDeps().
2. CleanNode(), which always passes 0 for the deps mtime.
So this is no behavior change in either case.
deps_mtime was nonzero only in deps mode, and it got passed all over the
place. This makes things simpler.
|
|\
| |
| | |
Simplify implementation of GetProcessorCount().
|
|/
|
|
|
|
|
|
|
| |
The current implementation is unnecessarily complex, because:
- The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN)
in terms of sysctl({CTL_HW,HW_NCPU}).
- get_nprocs() is a GNU extension, and glibc implements
sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().
|
|\
| |
| | |
Fix an issue with more than 64k deps, spotted by maximuska.
|
|/
|
|
| |
Also add a test for this case, which would have spotted the issue too.
|
|\
| |
| | |
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).
|
|\
| |
| | |
Suffix depslog path records with their expected index.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ninja assumes that numbering path entries in the deps log in order produces
valid dense integer ids. If two ninja processes write to the same deps log
concurrently, this is not true. Store the expected indices of path records
in the log and treat the rest of a deps log as invalid if the dense id of a
path record doesn't match the expected id stored in the log. Addresses the
rest of issue #595.
This requires bumping the deps log file format version. Do not migrate the
old version to the new, as the old format did not have this protection, and
might hence contain invalid data. (Unlikely, but possible.)
Also store the record id as one's complement, to make them look less like
regular deps record values. Since each record is written atomically this
isn't really necessary, but it makes the format somewhat more robust (and
easier to read in a hex editor).
|
|\
| |
| | |
Minor style fixes, no behavior change.
|
|/ |
|
|\
| |
| | |
Use fwrite in the msvc tool instead of printf
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This allows wide characters from the compiler to propagate through the
msvc tool. Similar to ad76e867f782e75e0fed620e7b39f7099af154a9.
|
|\ \ \
| | | |
| | | | |
Add a test for issue #638.
|
|/ / / |
|
|\ \ \
| |_|/
|/| | |
Fix for #638 incorrect number of total edges in the status message
|
|/ / |
|
|\ \
| | |
| | | |
Proof reading
|
|/ / |
|
|\ \
| | |
| | | |
Fix : Pure nested phony rules do not print "no work to do"
|
| | |
| | |
| | |
| | | |
Added NestedPhonyPrintsDone unit test
|
| | |
| | |
| | |
| | | |
.ninja_log
|
|\ \ \
| |/ /
|/| | |
Fix tabs/spaces inconsistency.
|
|/ / |
|
|\ \
| |/
|/| |
Fix the browse tool.
|
|/
|
|
|
|
|
| |
ReadFlags was altering argv in real_main causing us
to pass the wrong value into the NinjaMain constructor.
Fix this by storing the ninja command before real_main
runs.
|
|\
| |
| | |
Build log write error checking.
|
|/
|
|
| |
Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
|
|\
| |
| | |
Proposed/deps log write errors checking
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Merge pull request #617.
|
| | |
| | |
| | |
| | |
| | | |
When a single output of an edge is dirty, the restat check should
leave all outputs of that edge dirty.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a normal dependency scan (see DependencyScan::RecomputeDirty) we mark
all outputs of an Edge as dirty if any of the outputs is dirty. This is
the correct behavior because if any output is dirty, we will run the
command for that Edge and that can touch any of the outputs of the Edge
and so all the outputs should be marked dirty.
When updating the dirty state of Node's for a restat check, we were not
applying this logic, instead only those outputs that were actually
"dirty" were marked dirty.
Before this patch, restat edges with multiple outputs caused not all
dependent edges to run.
|
|\ \
| | |
| | | |
Land the first two commits of pull request #608.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Fix diagnostic formatting regression caused by adaa91a33eb2cf23b88.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Ninja regressed to include a location for every file on the include stack for
nested diagnostics, i.e. it would print:
input:1: include.ninja:1: expected path
Fix this so that it prints only the current file location, like it used to:
include.ninja:1: expected path
Also add a test for this.
|