| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Now, a 'build' block can override any special binding like 'command'
or 'description' if it needs to.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rather than passing States and DiskInterfaces through all the calls,
put the necessary ambient information in a new DependencyScan object
and move the code accordingly.
Note: I didn't move the source location of the functions to preserve
history, though this does result in a sort of weird order for the
functions in graph.cc.
|
| |
|
|
|
|
|
|
|
| |
This could cause overbuilding (if the log is missing an entry and
the right file is already in place) but is otherwise necessary
for correctness (if a file is already in place but we don't have
a log entry for it).
|
|
|
|
|
|
| |
This reverts commit 904c9610fe66c4f4bd63a07d6f057c8603d24394.
The commit caused issue #380, this revert fixes it. The revert
also makes the test from the previous commit pass.
|
|\
| |
| | |
Make StringPiece data members private.
|
| |
| |
| |
| | |
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
| |
| |
| |
| | |
Patch from Scott Graham <scottmg@chromium.org>.
|
|/
|
|
|
|
| |
So it matches with the class name in there.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
|
|
|
| |
- Edge::Dump could crash if called while inputs_ is being extended
- Node::Dump prints Node attributes, in-edge and lists of out-edges
- Dump functions now accept "prefix" parameter, printed along with the object
for easier orientation. For example, edge->Dump("Re-reading deps files").
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.build_log load time 350ms -> 17ms, filesize 197MB -> 1.6MB on
Mac. On Windows, it's 500ms -> 20ms.
Makes the build log a lot less useful for scripts, but there could
be a tool for use cases that need log information. A prototype of
such a tool is in https://github.com/nico/ninja/commit/1b243d311
The hash function is 64bit murmurhash2. Assuming that that different
commands get the same hash only by chance, it's is very unlikely
for two different commands to hash to the same value with a 64bit
hash.
|
|
|
|
|
|
|
|
| |
This was reported by cpplint as:
python ~/depot_tools/cpplint.py 2>&1 | grep -v "Done processing" | grep explicit
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
| |
|
|
|
|
|
|
|
|
| |
Even if such a target is dirty (i.e. the file does not exist), it
has nothing to do, which makes it safe to mark as outputs-ready.
Without this change, ninja will print no output when rebuilding the
target (or an order-only dependency thereof), instead of reporting
it has "no work to do".
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
1) Add a system for recording detailed timing info of functions.
2) Add a -d flag for requesting debug info at runtime, with the
above as the first user.
|
| |
|
| |
|
|
|
|
| |
Add some comments as well.
|
|
|
|
|
|
| |
Move various data members to private section and provide accessors for them.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The two were always one-to-one anyway. I started adding accessors
to FileStat and then realized most users wanted them on Node and
that forwarding them through was silly.
|
| |
|
| |
|
|
|
|
| |
It was firing too often, and hadn't uncovered any bugs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic before was like:
for each output:
if edge_dirty or output.dirty:
output.dirty = true
edge_dirty = true
This was wrong in the case where the second output would case the edge
to be dirty; we needed to go back and mark the first output dirty as
well. Fixed by taking two passes: one to compute the dirty state,
then a latter sweep to mark all outputs.
Fixes issue 148.
|
|
|
|
|
|
|
|
|
| |
Rather than taking whether the edge is dirty as an input, instead
only consider the arguments and return true/false, allowing the caller
to decide what to do with that information. (In the restat case we
were faking out the environment to get particular behavior for this.)
Should have no side effects, but this is part of fixing issue 148.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A restat rule is a rule which is capable of pruning the build tree
depending on the timestamps of its outputs before and after a build.
After a restat rule is rebuilt, Ninja will re-stat each output file
to obtain its current timestamp. If the timestamp is unchanged from
when Ninja initially stat'ed the file before starting the build,
Ninja will mark that output file as clean, and recursively for each
reverse dependency of the output file, recompute its dirty status.
Ninja then stores the most recent timestamp of any input file in the
build log entry associated with the output file. This timestamp
will be treated by future invocations of Ninja as the output file's
modification time instead of the output file's actual modification
time for the purpose of deciding whether it is dirty (but not whether
its reverse dependencies are dirty).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the implementation of order-only dependencies differed
between Make and Ninja in two important ways:
1) If the order-only dependency existed but was out of date, it
would never be rebuilt, whereas Make would always rebuild out of
date order-only dependencies.
2) If the order-only dependency did not exist, it would cause
its reverse dependencies to always build, whereas Make would only
rebuild a file if a non-order-only dependency was out of date.
A key distinction between Ninja and Make as seen through the above
two points was that in Ninja, order-only dependencies cared about
whether the target as a file exists (so perhaps a better name for
the old semantics would have been "missing-only dependencies").
These differences made it impossible to introduce an order-only
dependency on an always out-of-date (i.e. missing) target without
also causing the depender and its reverse dependencies to rebuild
unnecessarily on every build. Build systems which must perform some
action (such as logging the build start time, or printing a message)
at the start of every build typically implement this by adding to
every target an order-only dependency which performs this action,
which would have forced an entire rebuild on every invocation of
Ninja under the old semantics.
This commit causes Ninja to conform to the Make-style behaviour.
|
|
|
|
|
| |
dirty_ is intended to remain static during the build (unless a restat
occurs), while outputs_ready_ reflects the dynamic state of the build.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a rule attribute "generator" which, if present, specifies
that this rule is used to re-invoke the generator program. Files built
using generator rules are treated specially in two ways: firstly,
they will not be rebuilt if the command line changes; and secondly,
they are not cleaned by default.
A command line flag "-g" is introduced for the clean tool, which
causes it to remove generator files.
Fixes issue #102.
|
|
|
|
| |
Fixes part of issue 121, but the fix exposed a further issue.
|
|\
| |
| | |
Allocate space in the inputs vector for the depfile implicit deps
|