summaryrefslogtreecommitdiffstats
path: root/src/graph.h
Commit message (Collapse)AuthorAgeFilesLines
* path decanonicalization when building commandScott Graham2014-11-081-1/+4
|
* wip on adding tests at higher level, some not rightScott Graham2014-11-081-1/+7
|
* Make "depfile=$out.d" work if $out contains escaped characters, rspfile too.Nico Weber2014-05-211-0/+6
| | | | | | | | | | | | | | Fixes #730. This has always been broken, but due to #690 more paths are now escaped (e.g. paths containing + characters, like file.c++). Also see discussion in #689. The approach is to give EdgeEnv an enum deciding on whether or not to escape file names, and provide functions that evaluate depfile and rspfile with that set that to kNoEscape. (depfile=$out.d doesn't make sense on edges with multiple outputs.) This should be relatively safe, as $in and $out can't be used on edges, only on rules (#687).
* Introduce the "console" poolPeter Collingbourne2014-02-031-0/+1
| | | | | | | This is a pre-defined pool with a depth of 1. It has the special property that any task in the pool has direct access to the console. This can be useful for interactive tasks or long-running tasks which produce status updates on the console (such as test suites).
* Fix restat rebuild if deps are missing.Maxim Kalaev2013-09-021-2/+3
| | | | | | | | | | | | 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.
* Share more code between CleanNode() and RecomputeDirty().Maxim Kalaev2013-09-021-3/+7
| | | | | | | | | 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()).
* Check depslog timestamp in LoadDepsFromLog(), not in RecomputeOutputDirty().Maxim Kalaev2013-09-021-6/+5
| | | | | | | | | | | | 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.
* use logged deps mtime in dirty calculationEvan Martin2013-04-081-3/+5
| | | | | | | | The idea here is that it's possible for a build to complete (writing its output) but then for Ninja to get interrupted before writing out the updated dependency information. In that case the mtime stored in the deps log (if any) will match the previous output, and we'll know we need to rebuild the output just to get the deps updated.
* hook up depslog writing into build processEvan Martin2013-04-081-0/+8
|
* add "special=gcc" attribute, use to load depslogEvan Martin2013-04-081-1/+10
|
* plumb DepsLog load through BuilderEvan Martin2013-04-081-4/+5
|
* use DepsLog in loading dependenciesEvan Martin2013-04-081-5/+18
| | | | WIP
* factor out implicit dep loadingEvan Martin2013-04-081-5/+16
|
* add DepsLog, a new data structure for dependency informationEvan Martin2013-04-081-1/+8
| | | | | DepsLog is a compact serialization of dependency information. It can be used to replace depfiles for faster loading.
* rearrange handling of builtin bindings to make rules simplerEvan Martin2012-12-291-33/+10
| | | | | Now, a 'build' block can override any special binding like 'command' or 'description' if it needs to.
* wrap some overlong linesEvan Martin2012-12-291-1/+1
|
* update a commentEvan Martin2012-12-211-6/+3
|
* Make Edge->pool() a pointer like it should have beenRobert Iannucci2012-11-301-1/+1
|
* block parse method doneRobert Iannucci2012-11-101-0/+1
|
* and some basic implementationRobert Iannucci2012-11-091-0/+2
|
* stub out an api and de-constify PoolRobert Iannucci2012-11-091-0/+2
|
* remove unfortunate header dependencyEvan Martin2012-09-041-1/+0
| | | | This was temporarily added, and now it can be removed.
* clarify setterEvan Martin2012-09-041-1/+3
|
* move BuildLog to DependencyScanEvan Martin2012-09-041-5/+13
| | | | | | | The build log is needed in computing whether an edge is dirty, so I think it belongs here. (It's a bit weird that Builder needs to reach into it to record completed commands, maybe it will become cleaner with more thought.)
* remove a redundant arg to RecomputeOutputDirtyEvan Martin2012-09-021-2/+1
|
* split out dirty recomputation logic from Edge classEvan Martin2012-09-021-17/+32
| | | | | | | | | | 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.
* windows: fix size_t<->int conversions in ninja.exeEvan Martin2012-08-101-4/+4
|
* Improving Edge::Dump, introducing Node::DumpMaxim Kalaev2012-06-281-1/+3
| | | | | | | - 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").
* views: Mark single-argument constructors as explicit.Thiago Farina2012-05-061-3/+7
| | | | | | | | 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>
* add support for -d explain to help debug why rules are runningScott Graham2012-04-131-1/+2
|
* fix some public/private errors in rspfile patchEvan Martin2012-02-231-0/+2
|
* Merge pull request #217 from PetrWolf/masterEvan Martin2012-02-231-1/+16
|\ | | | | Response files
| * Add comments, remove unwanted whitespace changePetr Wolf2012-02-101-0/+10
| |
| * Response filesunknown2012-02-091-1/+6
| |
* | Fix the TODO in graph.h.Thiago Farina2012-02-161-2/+1
|/ | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* convert all time_t to a new TimeStamp typeEvan Martin2012-01-051-4/+4
|
* Fix warning about class previously declared as struct.Nicolas Despres2012-01-031-1/+1
| | | | Reported by clang++.
* switch the core ninja parser to use re2c for the lexerEvan Martin2011-12-291-2/+2
| | | | | | | | | - Delete the old "Tokenizer" code. - Write separate tests for the lexer distinct from the parser. - Switch the parser to use the new code. - New lexer error output has file:line numbers so e.g. Emacs can jump your editor to the syntax error. - The EvalEnv ($-interpolation) code is now part of the lexer as well.
* Follow up fix to commit 32bf74f (Fix the TODO in Rule class.)Thiago Farina2011-12-241-0/+1
| | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Fix the TODO in Rule class.Thiago Farina2011-12-241-13/+15
| | | | | | Move various data members to private section and provide accessors for them. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* make Rule::generator_ and restat_ privateEvan Martin2011-12-071-2/+10
|
* make Rule::name_ privateEvan Martin2011-12-071-0/+7
|
* remove unused functionEvan Martin2011-12-071-3/+0
|
* make Node::out_edges_ privateEvan Martin2011-12-071-3/+4
|
* make Node::in_edge_ privateEvan Martin2011-12-071-1/+7
|
* make Node::dirty_ privateEvan Martin2011-12-071-5/+11
|
* merge FileStat into NodeEvan Martin2011-12-071-18/+30
| | | | | | 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.
* refactor to remove Node::ready()Evan Martin2011-12-071-1/+3
|
* add and use getter for Edge::rule_Evan Martin2011-12-071-0/+1
|
* Factor out Edge::EvaluateDepFilePeter Collingbourne2011-12-061-0/+1
|