summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make depslog v1->v3 message less scary.Nico Weber2013-09-061-1/+1
| | | | See the comment 5 lines up for details.
* Merge pull request #650 from nico/simplifyNico Weber2013-09-021-18/+7
|\ | | | | Simplify.
| * Simplify.Nico Weber2013-09-021-18/+7
|/
* Merge pull request #649 from nico/fffNico Weber2013-09-021-1/+0
|\ | | | | Delete a line I failed to delete in d7a46654a7be1.
| * Delete a line I failed to delete in d7a46654a7be1.Nico Weber2013-09-021-1/+0
|/
* Merge pull request #648 from nico/landmaximNico Weber2013-09-024-53/+170
|\ | | | | Land the majority of pull request #608.
| * Fix restat rebuild if deps are missing.Maxim Kalaev2013-09-024-4/+126
| | | | | | | | | | | | | | | | | | | | | | | | 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-023-25/+23
| | | | | | | | | | | | | | | | | | 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-023-26/+23
|/ | | | | | | | | | | | 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.
* Merge pull request #647 from bmeurer/SimplifyGetProcessorCountEvan Martin2013-09-021-22/+2
|\ | | | | Simplify implementation of GetProcessorCount().
| * Simplify implementation of GetProcessorCount().Benedikt Meurer2013-09-011-22/+2
|/ | | | | | | | | The current implementation is unnecessarily complex, because: - The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN) in terms of sysctl({CTL_HW,HW_NCPU}). - get_nprocs() is a GNU extension, and glibc implements sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().
* Merge pull request #645 from nico/maximfixNico Weber2013-08-282-1/+34
|\ | | | | Fix an issue with more than 64k deps, spotted by maximuska.
| * Fix an issue with more than 64k deps, spotted by maximuska.Nico Weber2013-08-282-1/+34
|/ | | | Also add a test for this case, which would have spotted the issue too.
* Merge pull request #644 from nico/v3Nico Weber2013-08-282-30/+37
|\ | | | | Deps log format v3
| * document an assumptionNico Weber2013-08-281-0/+1
| |
| * Deps log format v3Nico Weber2013-08-282-30/+36
|/ | | | | | | | | | | | | | | This fixes two bugs. 1.) It makes the record size field 4 byte instead of 2, and allows a max record size of 512kB. This fixes #605, ninja "only" supporting 8k dependencies per file -- 512kB have room for 128k dependencies. (If that's still not enough, the current design can support at least 4x that if the constant is tweaked.) 2.) It makes all records 4-byte aligned, which is probably needed to make the `reinterpret_cast<int*>(buf)` work on SPARC (cf issue #481), and it's generally nicer too. (Since there's already one reinterpret_cast, convert a memcpy() to reinterpret_cast in another branch too).
* Merge pull request #642 from nico/depslogidxNico Weber2013-08-262-7/+34
|\ | | | | Suffix depslog path records with their expected index.
| * Suffix depslog path records with their expected index.Nico Weber2013-08-262-7/+34
|/ | | | | | | | | | | | | | | | | | ninja assumes that numbering path entries in the deps log in order produces valid dense integer ids. If two ninja processes write to the same deps log concurrently, this is not true. Store the expected indices of path records in the log and treat the rest of a deps log as invalid if the dense id of a path record doesn't match the expected id stored in the log. Addresses the rest of issue #595. This requires bumping the deps log file format version. Do not migrate the old version to the new, as the old format did not have this protection, and might hence contain invalid data. (Unlikely, but possible.) Also store the record id as one's complement, to make them look less like regular deps record values. Since each record is written atomically this isn't really necessary, but it makes the format somewhat more robust (and easier to read in a hex editor).
* Merge pull request #641 from nico/ocd2Nico Weber2013-08-235-6/+6
|\ | | | | Minor style fixes, no behavior change.
| * Minor style fixes, no behavior change.Nico Weber2013-08-235-6/+6
|/
* Merge pull request #628 from rnk/wstrNico Weber2013-08-231-1/+6
|\ | | | | Use fwrite in the msvc tool instead of printf
| * Merge branch 'master' into wstrReid Kleckner2013-08-197-8/+39
| |\
| * | Avoid indexing into an empty string.Reid Kleckner2013-08-191-1/+4
| | |
| * | Use fwrite in the msvc tool instead of printfReid Kleckner2013-07-261-1/+3
| | | | | | | | | | | | | | | This allows wide characters from the compiler to propagate through the msvc tool. Similar to ad76e867f782e75e0fed620e7b39f7099af154a9.
* | | Merge pull request #640 from nico/edgetestNico Weber2013-08-221-0/+1
|\ \ \ | | | | | | | | Add a test for issue #638.
| * | | Add a test for issue #638.Nico Weber2013-08-221-0/+1
|/ / /
* | | Merge pull request #639 from rgeary1/StatusMessageFixNico Weber2013-08-222-5/+2
|\ \ \ | |_|/ |/| | Fix for #638 incorrect number of total edges in the status message
| * | Fix for incorrect number of total edges in the status messageRichard Geary2013-08-222-5/+2
|/ /
* | Merge pull request #635 from johan/patch-1Nico Weber2013-08-131-1/+1
|\ \ | | | | | | Proof reading
| * | Proof readingJohan Sundström2013-08-131-1/+1
|/ /
* | Merge pull request #633 from rgeary1/NestedPhonyPrintsDoneEvan Martin2013-08-114-2/+33
|\ \ | | | | | | Fix : Pure nested phony rules do not print "no work to do"
| * | Fix for missing "no work to do." message if all build edges are phony rules.Richard Geary2013-08-113-2/+25
| | | | | | | | | | | | Added NestedPhonyPrintsDone unit test
| * | Add to .gitignore : SublimeText project files, *.patch files, ..ninja_deps, ↵Richard Geary2013-08-111-0/+8
| | | | | | | | | | | | .ninja_log
* | | Merge pull request #631 from kimgr/masterEvan Martin2013-08-071-3/+2
|\ \ \ | |/ / |/| | Fix tabs/spaces inconsistency.
| * | Fix tabs/spaces inconsistency.Kim Grasman2013-08-051-3/+2
|/ /
* | Merge pull request #627 from idealisms/masterEvan Martin2013-07-261-2/+3
|\ \ | |/ |/| Fix the browse tool.
| * Fix the browse tool.Tony Chang2013-07-261-2/+3
|/ | | | | | | ReadFlags was altering argv in real_main causing us to pass the wrong value into the NinjaMain constructor. Fix this by storing the ninja command before real_main runs.
* Merge pull request #626 from nico/logwriteEvan Martin2013-07-243-11/+21
|\ | | | | Build log write error checking.
| * Build log write error checking.Nico Weber2013-07-243-11/+21
|/ | | | 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-243-20/+56
|\ | | | | Proposed/deps log write errors checking
| * Adding checks for record overflow in deps_logMaxim Kalaev2013-07-011-6/+21
| |
| * Adding error checking on fwrite/fflush in deps_logMaxim Kalaev2013-07-013-18/+39
| |
* | Merge pull request #625 from nico/landNico Weber2013-07-202-12/+51
|\ \ | | | | | | Merge pull request #617.
| * | Add test for correct restat logicChris Hopman2013-07-201-0/+40
| | | | | | | | | | | | | | | When a single output of an edge is dirty, the restat check should leave all outputs of that edge dirty.
| * | 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.
* | Merge pull request #624 from nico/landmaximNico Weber2013-07-201-3/+2
|\ \ | | | | | | Land the first two commits of pull request #608.
| * | 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
|/ /
* | Merge pull request #623 from nico/fixNico Weber2013-07-193-4/+17
|\ \ | | | | | | Fix diagnostic formatting regression caused by adaa91a33eb2cf23b88.
| * | Fix diagnostic formatting regression caused by adaa91a33eb2cf23b88.Nico Weber2013-07-193-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ninja regressed to include a location for every file on the include stack for nested diagnostics, i.e. it would print: input:1: include.ninja:1: expected path Fix this so that it prints only the current file location, like it used to: include.ninja:1: expected path Also add a test for this.