summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | | Merge pull request #622 from nico/testNico Weber2013-07-181-0/+11
|\ \ \ | |/ / |/| | Add test for a manifest ending in the middle of a keyword.
| * | Add test for a manifest ending in the middle of a keyword.Nico Weber2013-07-181-0/+11
|/ /
* | Merge pull request #621 from nico/ninjaloadEvan Martin2013-07-181-10/+12
|\ \ | | | | | | Reuse ManifestParser::Load() in ManifestParser::ParseFileInclude().
| * | Add back contents.resize(), but with a comment and just 1 instead of 10.Nico Weber2013-07-181-0/+8
| | |
| * | Let the ".ninja parse" metric include the time to read the toplevel ninja file.Nico Weber2013-07-111-1/+1
| | | | | | | | | | | | | | | | | | Loads of included ninja files were covered by the ".ninja parse" in Parse() further up the stack from the toplevel file, but the load of the toplevel file wasn't counted. Fix that.
| * | Reuse ManifestParser::Load() in ManifestParser::ParseFileInclude().Nico Weber2013-07-111-9/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ParseFileInclude() was doing the work that Load() was doing. Instead, just make it call Load(). Also, remove a FIXME about using ReadPath() in ParseFileInclude() -- it's already being used. (The FIXME was added in the same commit that added the call to ReadPath() -- 8a0c96075786c19 -- it probably should've been deleted before that commit.) Also, remove a `contents.resize(contents.size() + 10);`. It's not clear what it's for, but if it was important then ManifestParser::ParseFileInclude() would have needed that call too, and it didn't have it. No intended behavior change.
* | Merge pull request #616 from nico/recompactEvan Martin2013-07-083-6/+34
|\ \ | | | | | | Add a 'recompact' tool, which forces recompaction of the build and deps ...
| * | Add a 'recompact' tool, which forces recompaction of the build and deps logs.Nico Weber2013-07-083-6/+34
| | | | | | | | | | | | This is useful for performance comparisons between two build directories.
* | | Merge pull request #614 from nico/pooldocEvan Martin2013-07-081-0/+4
|\ \ \ | | | | | | | | Mention pools in the discussion of ninja's toplevel declarations.
| * | | Mention pools in the discussion of ninja's toplevel declarations.Nico Weber2013-07-071-0/+4
| | | |
* | | | Merge pull request #611 from nico/testparseEvan Martin2013-07-082-5/+105
|\ \ \ \ | | | | | | | | | | Improve error message for duplicate rules and unknown pools.
| * | | | Improve error message for duplicate rules and unknown pools.Nico Weber2013-07-022-5/+105
| | |/ / | |/| | | | | | | | | | | | | | Also add more tests for invalid manifests. According to gcov, these invalid inputs weren't tested before.
* | | | Introducing tool 'deps' dumping ninja deps log entriesMaxim Kalaev2013-07-081-0/+42
| | | |
* | | | Merge pull request #615 from mdempsky/strict-murmurNico Weber2013-07-082-13/+16
|\ \ \ \ | |/ / / |/| | | Fix murmur hash implementations to work on strict alignment architectures
| * | | Fix murmur hash implementations to work on strict alignmentMatthew Dempsky2013-07-082-13/+16
|/ / / | | | | | | | | | architectures like OpenBSD/mips64el and OpenBSD/hppa64.
* | | Merge pull request #610 from rnk/wstrNico Weber2013-07-021-1/+5
|\ \ \ | | | | | | | | Use fwrite to print whatever the subcommand wrote
| * | | Use fwrite to print whatever the subcommand wroteReid Kleckner2013-07-021-1/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subcommands can write things like UTF-16, which some terminals can understand. printf() will interpret the null bytes as the end of the string. In particular, MSVC's assert() will print wide characters by default, and I can't find a way to disable it, leading to clang assertion failures looking like: FAILED: ...clang.exe ... Aninja: build stopped: subcommand failed. With this fix, I get the desired: FAILED: ...clang.exe ... Assertion failed: SymbolMap... ninja: build stopped: subcommand failed.
* | | Merge pull request #607 from dajohi/masterNico Weber2013-07-015-11/+16
|\ \ \ | |_|/ |/| | Support Bitrig
| * | use !defined(NOT_PPOLL)David Hill2013-07-011-2/+2
| | |
| * | Exclude Windows as wellDavid Hill2013-07-011-2/+2
| | |
| * | ugh, missing #David Hill2013-06-291-1/+1
| | |
| * | cleanup based on comments from martineDavid Hill2013-06-294-4/+4
| | |
| * | support BitrigDavid Hill2013-06-295-11/+16
|/ /
* | Merge pull request #601 from nico/109fixNico Weber2013-06-221-0/+1
|\ \ | | | | | | Add stdlib.h include for atol().
| * | Add stdlib.h include for atol().Nico Weber2013-06-221-0/+1
| |/ | | | | | | | | This attempts to fix issue #600. `man atol` claims that atol() is in stdlib.h, which wasn't included yet.
* | Merge pull request #596 from nico/chunkEvan Martin2013-06-141-0/+9
|\ \ | |/ |/| Make sure to not write partial deps entries.
| * Make sure to not write partial deps entries.Nico Weber2013-06-141-0/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | When two ninja instances run in parallel in the same build directory, one instance could write a deps entry header and a few ids, and then the other instance could write a file name in the middle of the deps header. When ninja reads this deps log on the next run, it will deserialize the file name as indices, which will cause an out-of-bounds read. (This can happen if a user runs a "compile this file" that uses ninja to compile the current buffer in an editor, and also does a full build in a terminal at the same time for example.) While running two ninja instances in parallel in the same build directory isn't a good idea, it happens to mostly work in non-deps mode: There's redundant edge execution, but nothing crashes. This is partially because the command log is line-buffered and a single log entry only consists of a single line. This change makes sure that deps entries are always written in one go, like command log entries currently are. Running two ninja binaries in parallel on the same build directory still isn't a great idea, but it's less likely to lead to crashes. See issue #595.
* Merge pull request #593 from nico/moretestEvan Martin2013-06-061-0/+61
|\ | | | | Add a test for CreatePhonyInEdge() in depsmode path.
| * Add a test for CreatePhonyInEdge() in depsmode path.Nico Weber2013-06-061-0/+61
|/ | | | | | Removing the `CreatePhonyInEdge(node);` line in `ImplicitDepLoader::LoadDepsFromLog()` made no tests fail before this change. The new test is a port to depsmode of the existing DepFileOK test.
* Merge pull request #592 from nico/addtestNico Weber2013-06-062-4/+28
|\ | | | | Add test that proves `node->AddOutEdge(edge);` in `LoadDepFile()` is nee...
| * Add test that proves `node->AddOutEdge(edge);` in `LoadDepFile()` is needed.Nico Weber2013-06-042-4/+28
|/ | | | No functionality change. Related to issue #590.
* Merge pull request #591 from nico/fixrestatNico Weber2013-06-042-0/+65
|\ | | | | Fix restat builds with edges generating headers depended on through deps...
| * Fix restat builds with edges generating headers depended on through deps filesNico Weber2013-06-032-0/+65
|/ | | | | | | | | | | | | in deps mode. `ImplicitDepLoader::LoadDepFile()` already adds a depfile edge from every file mentioned in a depfile to the depfile's output. `ImplicitDepLoader::LoadDepsFromLog()` didn't do this yet, so add it. Else, if a restat rule clears a generated .h file, this wouldn't propagate to cc files depending on that .h file through a depfile. Fixues issue #590.
* Merge pull request #589 from nico/wincaseNico Weber2013-05-295-17/+20
|\ | | | | Stop `-t msvc -o` from lowercasing paths from /showIncludes output.
| * Stop `-t msvc -o` from lowercasing paths from /showIncludes output.Nico Weber2013-05-295-17/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /showIncludes prints absolute paths. If a source file says `#include <WiNdOwS.h>`, /showIncludes will use that spelling in its output for the basename and use the on-disk cache for the directory names in the rest for its output. This makes the .d files created by `-t msvc -o` consistent with the .d files written by gcc and clang. Before this change, `-t msvc -o` would convert this output to lower case. This is a problem if a build step produces a header file with mixed case, such as "RuntimeFeatures.h". Due to the lowercasing, the .d file would contain "runtimefeatures.h", while the build step will create "RuntimeFeatures.h". Due to the case difference, ninja would not realize that regeneration of the .h file would require a rebuild of all source files having the header in the .d file. (On the next build, ninja would rebuild them since stat()ing is not case-sensitive on Windows.) One possible fix for this is to make sure that generators always write generated header files in lower case too, but on Mac gcc doesn't do lower-casing and .d files end up with the case-as-written, so generators would have to be different on Mac and Windows, which is undesirable. If case-insensitve path comparisons are useful, they should be done somewhere else (e.g. in CanonicalizePath()) where they affect both paths read from .d files and paths read from .ninja files. This should then be controlled by a top-level variable. This patch changes behavior, but it only has an effect on generated header files, which aren't common, and it only affects -t msvc, which is still marked as experimental. (cmake doesn't use it yet.) (If a file has both `#include <windows.h>` and `<Windows.h>`, this will now take 2 stat() calls instead of just one, but that should have a negligible cost.)
* Merge pull request #586 from grimmy/masterEvan Martin2013-05-291-1/+3
|\ | | | | Build fails on Debian/kfreebsd
| * Fixed the build on Debian/kfreebsdGary Kramlich2013-05-251-1/+3
| |
* | Merge pull request #588 from jonforums/mingw-fixEvan Martin2013-05-251-2/+2
|\ \ | |/ |/| Fix mingw based builds. Fixes #587
| * Fix mingw based builds. Fixes #587Jon2013-05-251-2/+2
|/