summaryrefslogtreecommitdiffstats
path: root/src/build.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make "depfile=$out.d" work if $out contains escaped characters, rspfile too.Nico Weber2014-05-211-5/+5
| | | | | | | | | | | | | | 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-2/+12
| | | | | | | 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).
* Minor style fixes. No functionality change.Nico Weber2013-10-191-1/+2
|
* add deps_prefix for localized /showIncludes' output parsingPeter Kümmel2013-10-181-2/+4
|
* add -d keeprsp to preserve @rsp files on success on windowsScott Graham2013-09-101-1/+2
|
* Fix restat rebuild if deps are missing.Maxim Kalaev2013-09-021-0/+4
| | | | | | | | | | | | 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-10/+2
| | | | | | | | | 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-1/+1
| | | | | | | | | | | | 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.
* Fix for incorrect number of total edges in the status messageRichard Geary2013-08-221-4/+1
|
* Fix for missing "no work to do." message if all build edges are phony rules.Richard Geary2013-08-111-1/+4
| | | | Added NestedPhonyPrintsDone unit test
* Build log write error checking.Nico Weber2013-07-241-2/+5
| | | | Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
* Merge pull request #612 from maximuska/proposed/deps_log_write_errors_checkingNico Weber2013-07-241-5/+11
|\ | | | | Proposed/deps log write errors checking
| * Adding error checking on fwrite/fflush in deps_logMaxim Kalaev2013-07-011-5/+11
| |
* | Fix restat dirty check logic for edges with multiple outputsChris Hopman2013-07-201-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | minor: removing noop call to MarkDirty(), fixing commentMaxim Kalaev2013-07-201-2/+1
| |
* | Removing a redundant stat() call with 'deps' and 'restat = 1'Maxim Kalaev2013-07-201-1/+1
|/
* keep dry run more similar to normal runNico Weber2013-04-221-4/+2
|
* Don't record deps in dry runs.Nico Weber2013-04-221-1/+3
| | | | | | | deps_log() is NULL during dry runs, so this fixes a crash. It also matches ninja 1.2.0's behavior as far as I can tell. Fixes issue #551.
* windows: always extract dependencies, even on compile failureEvan Martin2013-04-111-5/+7
| | | | We always want to filter /showIncludes output.
* always use output timestamp for depsEvan Martin2013-04-101-15/+2
| | | | | | | | Using the timestamp of the .d file was wrong. It can be written at a different time than the output, and it is immediately deleted after parsing; only the output remains for subsequent timestamp comparison purposes, so always use the output's timestamp. (This is how the code worked on Windows already.)
* fix windows build after depslogScott Graham2013-04-091-1/+1
|
* Merge branch 'dep-pipeless'Evan Martin2013-04-091-98/+181
|\ | | | | | | | | This merges a new mechanism for tracking "depfile" dependencies that is faster on all platforms but dramatically so on Windows.
| * add a straightforward deps log test, fix the other oneEvan Martin2013-04-091-6/+17
| | | | | | | | | | | | The first test I wrote was wrong; write a simpler test that exercises the "no failures" code paths, then fix the second test and the bugs it exposed.
| * Make deps=gcc without depfile an error.Nico Weber2013-04-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | When I first played with depslog, I accidentally removed the depfile attribute on my cc edges, which had the effect of ninja silently ignoring all depfiles. Instead, let ninja complain about edges that have deps set to gcc and depfile set to nothing. This is done at edge build time, instead of at mainfest load time, because adding this check to ParseEdge() regressed empty build time for target 'chrome' by 30ms. The check is only useful for generator authors, regular users should never see this.
| * add a test for the "deps out of date" caseEvan Martin2013-04-091-3/+5
| | | | | | | | It touched the various remaining XXXes in the code, hooray.
| * make it an error for now to have multiple outputs with depslogEvan Martin2013-04-081-1/+1
| |
| * only write deps log if edge is in deps log modeEvan Martin2013-04-081-11/+9
| |
| * use logged deps mtime in dirty calculationEvan Martin2013-04-081-1/+1
| | | | | | | | | | | | | | | | 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-94/+122
| |
| * remove depfiles files as they're parsedEvan Martin2013-04-081-4/+4
| |
| * windows: use CLParser to extract deps during buildEvan Martin2013-04-081-1/+8
| |
| * refactor build-time deps-extractionEvan Martin2013-04-081-0/+50
| |
| * plumb DepsLog load through BuilderEvan Martin2013-04-081-2/+3
| |
| * pass command results via a structEvan Martin2013-04-081-45/+29
| | | | | | | | | | WaitForCommand now passes all command output via a struct. This will allow adding more output in a future change.
* | Make LinePrinter members private, add comments.Nico Weber2013-04-091-3/+3
| |
* | move printing of new lines into LinePrinter.Nico Weber2013-04-091-19/+5
| |
* | refactor; no intended functionality changeNico Weber2013-04-091-7/+13
| |
* | move single-line printing to new classNico Weber2013-04-091-88/+9
|/
* Merge pull request #521 from riannucci/ignore_duplicate_edges_in_shcedule_workEvan Martin2013-03-261-0/+6
|\ | | | | Fix duplicate edge Pool crash in the minimally invasive way
| * Fix duplicate edge Pool crash in the minimally invasive wayRobert Iannucci2013-03-181-0/+6
| |
* | Added %e to manual.asciidoc, fixed brace style.Avinash Baliga2013-03-111-2/+1
| |
* | Made %e purely a number.Avinash Baliga2013-03-041-1/+1
| |
* | NINJA_STATUS now takes %e for elapsed time.Avinash Baliga2013-03-041-0/+8
|/
* rearrange handling of builtin bindings to make rules simplerEvan Martin2012-12-291-18/+20
| | | | | Now, a 'build' block can override any special binding like 'command' or 'description' if it needs to.
* wrap some overlong linesEvan Martin2012-12-291-4/+8
|
* fix all "class" -> "struct"Evan Martin2012-12-291-2/+1
|
* NINJA_STATUS: add support of `%p` for percentageyannicklm2012-12-141-0/+8
|
* Remove unnecessary parameter from ShouldDelayEdgeRobert Iannucci2012-11-301-1/+1
|
* Make Edge->pool() a pointer like it should have beenRobert Iannucci2012-11-301-7/+7
|
* Dump pools with StateRobert Iannucci2012-11-091-1/+0
|