summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Make manifest_parser_perftest build on Windows.Nico Weber2014-04-271-1/+3
|
* Merge pull request #714 from pcc/console-poolNico Weber2014-04-1713-43/+196
|\ | | | | Introduce the "console" pool
| * Introduce the "console" poolPeter Collingbourne2014-02-0313-43/+196
| | | | | | | | | | | | | | 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).
* | Merge pull request #715 from nico/lazyenvNico Weber2014-04-171-4/+5
|\ \ | | | | | | Allocate per-edge BindingEnvs lazily.
| * | Allocate per-edge BindingEnvs lazily.Nico Weber2014-02-111-4/+5
| |/ | | | | | | | | | | | | In chrome, only 2000 of 22000 build edges have bindings. A BindingEnv is 64 bytes, so allocating these only when needed saves a bit over 1 MB of memory. Since env chains are shorter for lookups, builds also become a tiny bit faster.
* | Manifest perftest: Try to make it build on Linux.Nico Weber2014-04-171-0/+1
| |
* | Manifest perftest: Pull manifest parsing into own function.Nico Weber2014-04-171-17/+20
| |
* | Manifest perftest: Also measure command evaluation time.Nico Weber2014-04-171-5/+31
| |
* | Add a simple manifest parsing perftest.Nico Weber2014-04-171-0/+82
| |
* | Rename parser_perftest to depfile_parser_perftest.Nico Weber2014-04-161-0/+0
| |
* | CLParser shouldn't read stderrScott Graham2014-04-142-1/+8
| |
* | Merge pull request #699 from mostynb/avoid_useless_mkdir_failureNico Weber2014-04-071-0/+3
|\ \ | | | | | | don't Fail if trying to mkdir when the dir already exists
| * | don't Fail if trying to mkdir when the dir already existsMostyn Bramley-Moore2014-01-071-0/+3
| | |
* | | Support both slashes on Windows when making output dirsScott Graham2014-04-032-6/+20
| |/ |/|
* | Don’t unnecessarily escape backslashes in Win32 pathsNicholas Hutchinson2014-01-082-1/+8
|/ | | | Under ::CommandLineToArgvW() rules, the backslash character only gets special treatment if it’s immediately followed by a double quote. So, when checking to see if a string needs Win32 escaping, it’s sufficient to check for the presence of a double quote character. This allows paths like "foo\bar" to be recognised as “sensible” paths, which don’t require the full escaping.
* Merge pull request #697 from nico/gclogsNico Weber2014-01-0711-24/+176
|\ | | | | Remove old outputs from build log and deps log during recompaction.
| * Make BuildLogUser reference constant.Nico Weber2014-01-078-13/+14
| |
| * Add a comment.Nico Weber2014-01-041-0/+7
| |
| * Rename "IsDead" to "BuildLogUser".Nico Weber2014-01-046-21/+30
| |
| * Move duplicated code into a helper function.Nico Weber2014-01-043-14/+20
| |
| * Add a test for collection of dead log entries.Nico Weber2014-01-041-0/+40
| |
| * Add a test for collection of dead deps entries.Nico Weber2014-01-032-1/+52
| |
| * Fix DepsLogTest.Recompact by making sure outputs aren't garbag-collected.Nico Weber2014-01-021-0/+10
| |
| * Make tests compile (one fails atm).Nico Weber2014-01-022-8/+11
| |
| * Remove dead entries in .ninja_log and .ninja_deps while recompacting.Nico Weber2014-01-024-8/+33
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #690 from nickhutchinson/feature/escape-paths-properlyNico Weber2014-01-066-12/+152
|\ \ | |/ |/| More robust escaping of $in, $out paths
| * More robust escaping of $in, $out pathsNicholas Hutchinson2014-01-066-12/+152
| | | | | | | | | | | | In summary: don’t escape if the path doesn’t contain problematic characters, otherwise: - Shell: enclose string in single quotes, escape embedded single quotes with the magic quote-backslash-quote sequence - Win32: Escape double quotes by doubling the number of consecutive backslashes that precede them (if any) and adding one more. Finally, double the number of trailing backslashes, and enclose the whole thing in double quotes.
* | Fix additional range in character class.Nico Weber2013-12-132-30/+43
|/ | | | | | | | The range was added in 7ab6dcbdb6447861eefafc47fc3e10f3273cede2, but that change only tried to add ! to the character class. Fix by moving '-' to the end of the class. Fixes #694.
* Add a test that shows that there is a single global namespace for rules.Nico Weber2013-10-271-0/+15
|
* Minor style fixes. No functionality change.Nico Weber2013-10-194-8/+13
|
* Merge pull request #665 from syntheticpp/localized-showincludeNico Weber2013-10-187-26/+41
|\ | | | | add deps_prefix for localized /showIncludes' output parsing
| * add deps_prefix for localized /showIncludes' output parsingPeter Kümmel2013-10-187-26/+41
| |
* | Fix compilation on VS2013Scott Graham2013-10-183-0/+4
|/
* mark this 1.4.0.git, update RELEASINGEvan Martin2013-09-121-1/+1
|
* add -d keeprsp to preserve @rsp files on success on windowsScott Graham2013-09-105-3/+12
|
* Simplify.Nico Weber2013-09-081-3/+2
|
* Fix for build test for BuildWithDepsLogTest.RestatMissingDepfileDepslogRichard Geary2013-09-071-1/+4
|
* Make depslog v1->v3 message less scary.Nico Weber2013-09-061-1/+1
| | | | See the comment 5 lines up for details.
* Simplify.Nico Weber2013-09-021-18/+7
|
* Delete a line I failed to delete in d7a46654a7be1.Nico Weber2013-09-021-1/+0
|
* 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.
* 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().
* 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.
* 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).
* 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).
* 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