| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Patch #933 fixed a crash with duplicate edges by not adding edges to the
graph if all the edge's outputs are already built by other edges.
However, it added the edge to the out_edges of the edge's input nodes
before deleting it, letting inputs refer to dead edges.
To fix, move the check for deleting an edge above the code that adds
inputs. Expand VerifyGraph() to check that nodes don't refer to edges
that aren't present in the state.
|
|\
| |
| | |
Add notes on using afl-fuzz to HACKING.
|
|/ |
|
|\
| |
| | |
Make failing stat() calls abort the build.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #830, fixes #904.
In practice, this either happens with 64-bit inodes and a 32-bit
userspace when building without -D_FILE_OFFSET_BITS=64 in CFLAGS, or
when a filename is longer than the system file length limit.
Since DiskInterface::Stat() returns -1 on error, and Node used -1 on
"stat state unknown", not aborting the build lead to ninja stat()ing the
same file over and over again, until it finally ran out of stack. That's
now fixed.
* Change RecomputeOutputsDirty() to return success instead of dirty
state (like RecomputeDirty()) and return the dirty state in a bool
outparam
* Node::Stat()s old return value wasn't used anywhere, change the
function to return success instead and add an |err| outparam
* Node::StatIfNecessary()'s old return value was used only in one place.
Change that place to explicitly check status_known() and make
StatIfNecessary() return success and add an |err| outparam
* Plan::CleanNode() can now fail, make it return bool and add an |err|
outparam
|
|\ \
| |/
| | |
Minor cleanups. No behavior change.
|
| | |
|
|/ |
|
|\
| |
| | |
On unexpected output in a .d file, rebuild instead erroring.
|
| |
| |
| |
| | |
Fixes #417.
|
| |
| |
| |
| | |
This is a prerequisite for fixing #417.
|
|\ \
| | |
| | | |
Build self-consistent graphs for dupe edges with multiple outputs.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #867, both the crashes and "[stuck]" issues.
The problem was that a duplicate edge would modify the in_edge of the
outputs of the new build rule, but the edge corresponding to the old
build rule would still think that the in_edge points to itself.
`old_edge->outputs_[0]->in_edge()` would not return `old_edge`, which
confused the scan logic.
As fix, let `State::AddOut()` reject changing in_edge if it's already
set. This changes behavior in a minor way: Previously, if there were
multiple edges for a single output, the last edge would be kept. Now,
the first edge is kept. This only had mostly-well-defined semantics if
all duplicate edges are the same (which is the only case I've seen in
practice), and for that case the behavior doesn't change.
For testing, add a VerifyGraph() function and call that every time any
test graph is parsed. That's a bit more code than just copying the test
cases from the bug into build_test.cc, but it also yields better test
coverage overall.
|
|\ \
| |/
|/| |
Remove option no longer needed now that we don't use gtest.
|
|/ |
|
| |
|
|\
| |
| | |
subprocess_test: gracefully handle rlim.rlim_cur < kNumProcs
|
| |
| |
| |
| |
| |
| | |
Instead of expecting that the number of open files is well above
kNumProcs, simply "skip" the test in that case, still printing the
message about the test limit (adding the current system limit too).
|
|\ \
| | |
| | | |
POSIX: detach background subprocesses from terminal.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Put background subprocesses (i.e. subprocesses with no access
to the console) in their own session and detach them from the
terminal.
This fixes martine/ninja#909.
|
|\ \ \
| | | |
| | | | |
Make diagnostics colored with new gccs (4.9+) too.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Both clang and gcc understand -fdiagnostics-color, so use that flag name.
(This will disable colored diagnostics for clangs older than LLVM 3.3,
but that is several years old by now.)
|
|\ \ \ \
| |/ / /
|/| | | |
Fix build with libc++ after #921.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It failed with
error: field has incomplete type 'EvalString'
note: in instantiation of exception specification for 'map' requested here
explicit Rule(const string& name) : name_(name) {}
^
|
|\ \ \
| | | |
| | | | |
Allow scoping rules through subninja
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new test shows the added value of scoped rules by demonstrating
a multi-level build where a single rules file gets included at all
the levels. By scoping rules, this is possible.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Ninja didn't support scoping rules through subninja and assumed
a unique rule name in the whole namespace. With this change, this
behavior is changed to allow scoping rules. Two rules can have the
same name if they belong to two different scopes. However, two
rules can NOT have the same name in the same scope.
|
|\ \ \
| | | |
| | | | |
Test for Clang by checking --version
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Directly pass the string instead of char * to Truncate util function. It...
|
|/ /
| |
| |
| | |
will prevent useless conversions.
|
|\ \
| | |
| | | |
Typo fix in graph.cc
|
|/ / |
|
|\ \
| |/
|/| |
Allow manifest rebuild to loop up to 100 times
|
|/
|
|
|
|
|
|
|
| |
Ninja generators that bootstrap themselves with Ninja may need
to rebuild build.ninja multiple times. Replace the 2 cycle loop
with a 100 cycle loop, and print the pass number each time it
restarts.
Original-author: Jamie Gennis <jgennis@gmail.com>
|
|\
| |
| | |
Check pending SIGINT after ppoll/pselect
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ppoll/pselect prioritizes file descriptor events over
a signal delivery. So a flood of events prevents ninja
from reacting keyboard interruption by the user.
This CL adds a check for pending keyboard interruptions after
file descriptor events.
|
|\ \
| | |
| | | |
Document how to run gcov on ninja.
|
|/ / |
|
|\ \
| | |
| | | |
Remove an incorrect assert.
|
|/ /
| |
| |
| |
| |
| | |
The assert fires on cyclic manifests (found by afl-fuzz). Since there
was explicit error handing for this case already, just remove the
assert.
|
|\ \
| |/
|/| |
Cleanup: Fix 'hasIdent' variable name/style.
|
| |
| |
| |
| |
| |
| |
| | |
Seems more correct to name it has_indent_token and to use the
unix_hacker style.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|\ \
| | |
| | | |
Try to simplify d1e6a29 a bit.
|
|/ / |
|
|\ \
| | |
| | | |
Remove unused hash<std::string>.
|
|/ /
| |
| |
| |
| | |
ExternalStringHashMap used to store std::strings long ago. Since it
doesn't anymore, this specialization isn't needed. No behavior change.
|
|\ \
| |/
|/| |
Fix compilation errors on Visual Studio 2015 (_MSC_VER 1900)
|
|/ |
|
|\
| |
| | |
Remove 'Recompacting...' messages.
|