summaryrefslogtreecommitdiffstats
path: root/src/build_log.h
Commit message (Collapse)AuthorAgeFilesLines
* Always rebuild on errorsColin Cross2017-05-221-3/+3
| | | | | | | | | | https://groups.google.com/forum/#!msg/ninja-build/YQuGNrECI-4/ti-lAs9SPv8J discusses a case where an rule updates its output file and then fails. The next run of ninja considers the ouptut file clean and doesn't rebuild it. Always stat output files after they are built, and write the mtime into .ninja_log. Consider output files dirty if the recorded mtime is older than the most recent input file.
* Fix typo.Nicolas Despres2015-09-241-1/+1
|
* Remove 'Recompacting...' messages.Nico Weber2014-12-181-2/+0
| | | | | | | | | | Recompacting the build log used to be slow, so it made sense to print this message. We then made recompaction much faster, but didn't remove this message back then. The deps log only has it because the build log had it. Since both steps are effectively instant in practice, remove these log messages.
* Don't print "Recompacting..." message from tests.Nico Weber2014-09-191-0/+2
| | | | Now tests don't print anything. Non-test behavior is unchanged.
* Make BuildLogUser reference constant.Nico Weber2014-01-071-3/+3
|
* Rename "IsDead" to "BuildLogUser".Nico Weber2014-01-041-3/+6
|
* Remove dead entries in .ninja_log and .ninja_deps while recompacting.Nico Weber2014-01-021-2/+6
| | | | | | | | | | For .ninja_deps, remove objects that have no in-edges or whose in-edges do not have a "deps" attribute. (This matches the behaviour of `-t deps`). BuildLog doesn't know about state, so let its recompact method take delegate that decides is a path is life or not, and implement it in NinjaMain.
* Build log write error checking.Nico Weber2013-07-241-2/+2
| | | | Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
* Remove a few unused includes.Nico Weber2013-05-121-1/+0
|
* wrap some overlong linesEvan Martin2012-12-291-1/+2
|
* build log: mini-refactoring to use constructors to initialize entriesMaxim Kalaev2012-10-121-0/+3
|
* remove config from BuildLog, rename membersEvan Martin2012-09-021-11/+7
|
* fix windows buildScott Graham2012-06-151-0/+1
|
* Only store command hashes in the build log.Nico Weber2012-06-151-2/+4
| | | | | | | | | | | | | | .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.
* Make |log_| variable private to BuildLog.Evan Martin2012-04-051-2/+3
| | | | | | This fix the TODO in build_log.h file. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Fix cygwin build by including stdio.h hereokuoku2012-01-251-0/+1
|
* convert all time_t to a new TimeStamp typeEvan Martin2012-01-051-2/+3
|
* revert part of c33b198 to fix build of ninja_testEvan Martin2011-12-221-1/+2
|
* Protect BuildLog data member variables by making them private.Thiago Farina2011-12-201-1/+2
| | | | | | | | | They are not accessed outside of BuildLog and there is even a SetConfig function to set the |config_| variable. So better to make them private to BuildLog now while nobody is using it outside. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* Implement restat rulesPeter Collingbourne2011-10-241-2/+5
| | | | | | | | | | | | | | | | | 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).
* generalize the pattern of hash_map<const char*, ...>, use in BuildLogEvan Martin2011-09-121-1/+3
| | | | | | Refactor the code in StatCache for use in BuildLog. Now both use hash tables where the keys are const char*. Removes another 30ms from Chrome no-op builds.
* Support for rebuilding and reloading manifest filesPeter Collingbourne2011-09-031-0/+1
| | | | | | This introduces support for rebuilding the top-level manifest file using a provided build statement, and reloading it before building the user-requested targets.
* add a versioning header to build log, switch to v2Evan Martin2011-05-111-3/+7
| | | | | In v2 we store both the start and end time of the command. This allows better visualization of the build process.
* add doxygen-compatibile comments to most classesEvan Martin2011-04-291-11/+12
|
* Add missing CPP guards.Nicolas Despres2011-03-221-0/+5
|
* add copyrightsEvan Martin2011-02-061-0/+14
|
* pass config into build logEvan Martin2011-01-231-0/+3
|
* recompact log filesEvan Martin2011-01-231-0/+7
|
* don't crash in tests where we don't use a log fileEvan Martin2011-01-081-0/+2
|
* add a class for logging builds (commands + timing)Evan Martin2010-12-231-0/+37