summaryrefslogtreecommitdiffstats
path: root/src/build.h
Commit message (Collapse)AuthorAgeFilesLines
* move BuildLog to DependencyScanEvan Martin2012-09-041-2/+6
| | | | | | | 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.)
* split out dirty recomputation logic from Edge classEvan Martin2012-09-021-1/+3
| | | | | | | | | | 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.
* use DiskInterface to create the build directoryEvan Martin2012-08-071-2/+4
| | | | | | | | | | Fixes issue #392 (didn't handle creating nested build dirs right). Moves MakeDir out of util.h; all code should go through DiskInterface to simplify testing. Moves ownership of the DiskInterface into the client of the Builder, which also allows removing some code that reached inside the object as well as a minor leak.
* GCC 4.7 needs cstdioPeter Kümmel2012-07-151-1/+1
|
* print edges per secondPeter Kuemmel2012-07-151-0/+35
| | | | | | | | | | | prints the rate of finished edges per second to the console, for instance with NINJA_STATUS="[%s/%t %o(%c)/s] ": [132/1922 16.1(14)/s] 16.1 is the average for all processed files (here 132 since start) 14 is the average of the last n files while n is the number specifies by -j (or its default)
* Merge pull request #316 from tfarina/structEvan Martin2012-06-171-4/+5
|\ | | | | No need to write 'struct' before type name when declaraing variables in ...
| * No need to write 'struct' before type name when declaraing variables in C++.Thiago Farina2012-05-231-4/+5
| | | | | | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* | Remove unused variable last_update_millis_.Nico Weber2012-06-011-2/+0
|/
* views: Mark single-argument constructors as explicit.Thiago Farina2012-05-061-1/+1
| | | | | | | | 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>
* Fix Windows build.Nico Weber2012-04-301-1/+1
|
* Merge pull request #274 from polrop/max_load_averageEvan Martin2012-04-281-1/+4
|\ | | | | Max load average
| * Add -l N option to limit the load average.Nicolas Despres2012-04-191-1/+4
| | | | | | | | | | | | | | This is similar to GNU make -l/--load-average option. It limits the number of job started if the load average exceed the given value. It can be very useful when running ninja on a continuous integration server where we want to use parallelism as much as possible without overloading the server.
* | reduce custom ninja status patch in minor waysEvan Martin2012-04-261-15/+2
| | | | | | | | | | Elsewhere in the code I avoid sstream and manual buffer management, so switch this code to behave similarly. Sorry for being OCD.
* | Refactor and test progress status formatting.Nicolas Despres2012-04-241-0/+58
|/
* Be more selective about deleting output files when interruptedPeter Collingbourne2012-03-011-0/+3
| | | | | | | Specifically, only delete if the file was modified or if the rule uses a depfile. Fixes issue #226.
* If a command fails, wait for all running commands to terminate before we doPeter Collingbourne2012-02-041-2/+2
| | | | | | | | | | | | | | | | | | Previously, if a command fails, the fate of the other child processes running in parallel was inadequately controlled. On POSIX platforms, the processes were orphaned. Normally they would run to completion, but were liable to being killed by a SIGPIPE. On Windows, the child processes would terminate with the parent. The cleanup-on-interrupt patch caused the SubprocessSet and Builder destructors to clean up after themselves by killing any running child processes and deleting their output files, making the behaviour more predictable and consistent across platforms. If the build is interrupted by the user, this is correct behaviour. But in the case where the build is stopped by a failed command, this would be inconsistent with user expectations. In the latter case, we now let any remaining child processes run to completion before leaving the main loop in Builder::Build.
* Implement cleanup-on-interruptPeter Collingbourne2012-02-041-2/+13
| | | | | | | | This causes us to clean up by deleting any output files belonging to currently-running commands before we quit if we are interrupted (either by Ctrl-C or by a command failing). Fixes issue #110.
* Implement restat rulesPeter Collingbourne2011-10-241-0/+4
| | | | | | | | | | | | | | | | | 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).
* Split Node::dirty_ into two flags: Node::dirty_ and Edge::outputs_ready_Peter Collingbourne2011-10-181-2/+12
| | | | | dirty_ is intended to remain static during the build (unless a restat occurs), while outputs_ready_ reflects the dynamic state of the build.
* fix redundant manifest rebuildEvan Martin2011-09-081-0/+9
| | | | | | | Don't rebuild the manifest when it's already up to date. The underlying problem was that Builder::Build has a confusing API; split the API so it's more clear for callers what the return values mean.
* simplify CommandRunner, simplifying users tooEvan Martin2011-05-171-4/+2
| | | | | After much staring at this I think I found the more clear way to express what it's doing.
* refactor status printing into BuildStatusEvan Martin2011-05-141-2/+2
| | | | | | Centralizing printing allows being more careful about what is output. 1) Always include the [2/15] prefix on commands. 2) Make the header command match the error output command.
* add support for ignoring failures of some subtasksEvan Martin2011-05-091-1/+4
|
* use refactored function to support implicit "all" targetEvan Martin2011-05-011-0/+1
|
* add doxygen-compatibile comments to most classesEvan Martin2011-04-291-16/+18
|
* add copyrightsEvan Martin2011-02-061-0/+14
|
* fancier outputEvan Martin2011-02-051-2/+7
|
* parallelism flag, guess based on cpuinfoEvan Martin2011-02-011-1/+2
|
* catch ourselves when we're stuckEvan Martin2011-01-081-1/+3
|
* state holds build log, not configEvan Martin2011-01-071-2/+1
|
* move buildlog to main driverEvan Martin2010-12-261-1/+2
|
* hook up build logEvan Martin2010-12-261-0/+1
|
* rename BuildStatusLogEvan Martin2010-12-231-1/+1
|
* fix plan edge count computationEvan Martin2010-12-201-1/+1
|
* verbosity tristateEvan Martin2010-12-141-3/+8
|
* use separate config objectEvan Martin2010-12-131-4/+8
|
* dry run flagEvan Martin2010-12-131-0/+1
|
* verbose modeEvan Martin2010-12-071-0/+2
|
* factor out build loggingEvan Martin2010-12-061-0/+1
|
* move src into subdirEvan Martin2010-12-051-0/+75