Nico Weber [Fri, 24 May 2013 01:20:22 +0000 (18:20 -0700)]
Don't use va_start() with reference parameters, it's undefined behavior.
Should fix issue #584.
Evan Martin [Thu, 16 May 2013 23:21:41 +0000 (16:21 -0700)]
call this version 1.3.0
Evan Martin [Fri, 3 May 2013 20:16:55 +0000 (13:16 -0700)]
delete obsolete todo
Evan Martin [Tue, 14 May 2013 16:03:00 +0000 (09:03 -0700)]
Merge pull request #572 from nico/incless
Remove a few unused includes.
Nico Weber [Sun, 12 May 2013 03:40:26 +0000 (20:40 -0700)]
Remove a few unused includes.
Evan Martin [Wed, 8 May 2013 23:20:52 +0000 (16:20 -0700)]
Merge pull request #568 from riannucci/fix_test
Fix pool tests (and provide utility to fix other similar issues as well)
Nico Weber [Wed, 8 May 2013 17:03:52 +0000 (10:03 -0700)]
Merge pull request #570 from nico/fixdarwin
Fix bootstrap on OS X.
Nico Weber [Wed, 8 May 2013 17:01:15 +0000 (10:01 -0700)]
Fix bootstrap on OS X.
This was broken in
4c552c2c3cbc07acce9c1a379fee054a3f680100.
Robert Iannucci [Mon, 6 May 2013 21:51:55 +0000 (14:51 -0700)]
Fix Pool tests.
At any phase in the test where multiple edges are ready
simultaneously, acquire all edges and sort them into a predictable
order. This allows the test to execute deterministically regardless
of the order of edge allocation.
Evan Martin [Wed, 1 May 2013 21:50:38 +0000 (14:50 -0700)]
Merge pull request #565 from mdempsky/master
Add support for OpenBSD.
Matthew Dempsky [Wed, 1 May 2013 20:05:00 +0000 (13:05 -0700)]
Don't poll pipes using POLLRDHUP
POLLRDHUP is Linux-specific, and isn't necessary for polling pipes
anyway. Linux and OpenBSD both return POLLHUP if no process has the
pipe open for writing.
Nico Weber [Wed, 1 May 2013 18:52:45 +0000 (11:52 -0700)]
Merge pull request #566 from nico/tweak
minor formatting change
Nico Weber [Wed, 1 May 2013 18:51:51 +0000 (11:51 -0700)]
minor formatting change
Nico Weber [Wed, 1 May 2013 18:10:47 +0000 (11:10 -0700)]
Merge pull request #563 from nico/recompact-deps
Implement deps log recompaction.
Matthew Dempsky [Wed, 1 May 2013 18:03:27 +0000 (11:03 -0700)]
Add support for OpenBSD.
Use ppoll() on OpenBSD. Also, fix interrupt handling to recognize
that on FreeBSD and OpenBSD, an interrupt might have been delivered
even if pselect()/ppoll() don't return -1/EINTR.
Nico Weber [Tue, 30 Apr 2013 16:24:48 +0000 (09:24 -0700)]
Recompact the deps log when it gets too big.
Now that Recompact() keeps all data structures intact, it can just be
called at the beginning of a build and the build will still work.
Nico Weber [Tue, 30 Apr 2013 16:11:09 +0000 (09:11 -0700)]
Keep a DepsLog's data valid after a call to DepsLog::Recompact().
Previously, a DepsLog would become invalid after Recompact() was called,
due to Recompact() making all node ids refer to a temporary DepsLog
object constructed in Recompact().
Nico Weber [Tue, 30 Apr 2013 15:55:49 +0000 (08:55 -0700)]
Let DepsLog::RecordDeps() update its in-memory representation.
This is a behavior change, but it should be safe: Graph only queries the
deps log at startup, before running any command. Nothing else currently
queries the deps log.
Nico Weber [Tue, 30 Apr 2013 15:44:25 +0000 (08:44 -0700)]
Move updating DepsLog's deps_ array into its own function.
No functionality change.
Nico Weber [Tue, 30 Apr 2013 15:40:56 +0000 (08:40 -0700)]
Move some DepsLog::Deps initialization code into its constructor.
No functionality change.
Patrick von Reth [Tue, 30 Apr 2013 15:29:13 +0000 (08:29 -0700)]
share platform support between configure/bootstrap
Evan Martin [Tue, 30 Apr 2013 15:26:23 +0000 (08:26 -0700)]
Merge pull request #562 from TheOneRing/fixed-include
added missing windows include for Truncate
Patrick von Reth [Tue, 30 Apr 2013 07:44:11 +0000 (09:44 +0200)]
added missing windows include
Nico Weber [Mon, 29 Apr 2013 17:21:44 +0000 (10:21 -0700)]
Merge pull request #559 from nico/9_9
Fix Windows build more.
Nico Weber [Mon, 29 Apr 2013 17:20:55 +0000 (10:20 -0700)]
Fix Windows build more.
Evan Martin [Mon, 29 Apr 2013 16:02:23 +0000 (09:02 -0700)]
Merge pull request #558 from nico/buildfix
Introduce a Truncate() function that works on POSIX and Windows.
Nico Weber [Mon, 29 Apr 2013 15:57:31 +0000 (08:57 -0700)]
Introduce a Truncate() function that works on POSIX and Windows.
Hopefully fixes the build on Windows.
Evan Martin [Mon, 29 Apr 2013 16:01:47 +0000 (09:01 -0700)]
Merge pull request #556 from nico/unlink
Make sure that recompaction writes a pristine new depslog.
Evan Martin [Mon, 29 Apr 2013 16:01:17 +0000 (09:01 -0700)]
Merge pull request #555 from nico/depscompactcrash
Don't crash during deps log recompaction if there's more than one deps entry.
Nico Weber [Mon, 29 Apr 2013 07:42:21 +0000 (00:42 -0700)]
Make sure that recompaction writes a pristine new depslog.
...even if a prior run of DepsLog::Recompact() exited without cleaning
up, for example due to a crash or because someone added a `return true;`
in the middle of the function while debugging. Or because someone hits
ctrl-c during deps log recompaction.
No test, because I can't think of a way to trigger this scenario
programmatically.
Part of issue #554.
Nico Weber [Mon, 29 Apr 2013 07:36:34 +0000 (00:36 -0700)]
Don't crash during deps log recompaction if there's more than one deps entry.
Part of issue #554.
Evan Martin [Sat, 27 Apr 2013 21:37:26 +0000 (14:37 -0700)]
don't count eof as truncated
Evan Martin [Sat, 27 Apr 2013 21:27:24 +0000 (14:27 -0700)]
fix warning
Evan Martin [Sat, 27 Apr 2013 20:39:04 +0000 (13:39 -0700)]
deps log: recover on truncated entry
If a read fails while reading an entry, truncate the log to the last
successfully read entry. This prevents corruption when a subsequent
run appends another entry.
Evan Martin [Fri, 26 Apr 2013 18:25:21 +0000 (11:25 -0700)]
disable SubprocessTest.SetWithLots on travis-ci
We run into fork() limits on their VM.
Evan Martin [Fri, 26 Apr 2013 18:21:57 +0000 (11:21 -0700)]
add a test for truncated deps
This doesn't yet exhibit the full problems with truncation, but it's
a start.
Evan Martin [Fri, 26 Apr 2013 18:02:08 +0000 (11:02 -0700)]
make DepsLogTest actually clean up on teardown
I think I commented this out when tracking down a bug and forgot
to uncomment it.
Evan Martin [Mon, 22 Apr 2013 15:12:09 +0000 (08:12 -0700)]
travis: pull in gtest before building
Evan Martin [Mon, 22 Apr 2013 15:06:37 +0000 (08:06 -0700)]
add a .travis.yml, trying out travis-ci.org
Evan Martin [Mon, 22 Apr 2013 15:05:01 +0000 (08:05 -0700)]
Merge pull request #552 from nico/deps_dryrun
Don't record deps in dry runs.
Nico Weber [Mon, 22 Apr 2013 05:03:20 +0000 (22:03 -0700)]
keep dry run more similar to normal run
Nico Weber [Mon, 22 Apr 2013 00:55:10 +0000 (17:55 -0700)]
Don't record deps in dry runs.
deps_log() is NULL during dry runs, so this fixes a crash. It also
matches ninja 1.2.0's behavior as far as I can tell.
Fixes issue #551.
Evan Martin [Fri, 19 Apr 2013 21:38:23 +0000 (14:38 -0700)]
adjust the wording in "multiple rules generate X" warning
Ideally we'd detect this at build time and only warn if your build
was affected, but that's hard to do. (Really we should just abort
when this scenario is detected rather than continuing, but now
users are relying on it.)
Hopefully improves issue #543.
Evan Martin [Fri, 19 Apr 2013 21:32:29 +0000 (14:32 -0700)]
make DiskInterfaceTest.StatBadPath quiet
Add a flag to temporarily suppress error output.
Fixes issue #281.
Evan Martin [Thu, 18 Apr 2013 18:27:20 +0000 (11:27 -0700)]
drop std:: qualifiers on more stl datatypes
We "using namespace std" anywhere we need a std::string or a std::vector.
Nico Weber [Thu, 18 Apr 2013 04:20:19 +0000 (21:20 -0700)]
Merge pull request #548 from sgraham/laconic-with-repeat
reset count in LaconicPrinter for when using --gtest_repeat
Scott Graham [Thu, 18 Apr 2013 00:30:06 +0000 (17:30 -0700)]
also print iteration for gtest_repeat=-1
Evan Martin [Mon, 15 Apr 2013 21:41:10 +0000 (14:41 -0700)]
fix --profile=pprof on newer ubuntus
The --as-needed default for ld would drop -lprofiler.
Scott Graham [Wed, 17 Apr 2013 20:05:50 +0000 (13:05 -0700)]
reset count in LaconicPrinter for when using --gtest_repeat
Nico Weber [Tue, 16 Apr 2013 19:20:49 +0000 (12:20 -0700)]
Merge pull request #547 from nico/vim_cpo
Note that version 1.3 of the vim syntax file has been sent upstream.
Nico Weber [Tue, 16 Apr 2013 19:18:39 +0000 (12:18 -0700)]
Note that version 1.3 of the vim syntax file has been sent upstream.
Also fix an issue noticed by Bram during integration: Make sure to set "cpo"
correctly. This matches other vim syntax files and is required to make sure
that the backslash continuation works with all .vimrc files
(see `:help line-continuation`).
Evan Martin [Sat, 13 Apr 2013 19:37:16 +0000 (12:37 -0700)]
Merge pull request #541 from sgraham/fix-vs2012
try again on vs2012 build fixes
Evan Martin [Thu, 11 Apr 2013 21:05:13 +0000 (14:05 -0700)]
bootstrap: make --windows usable for cl.exe-on-wine
Evan Martin [Thu, 11 Apr 2013 20:50:36 +0000 (13:50 -0700)]
add HACKING note on cl.exe-via-wine
Evan Martin [Thu, 11 Apr 2013 19:46:34 +0000 (12:46 -0700)]
windows: always extract dependencies, even on compile failure
We always want to filter /showIncludes output.
Evan Martin [Thu, 11 Apr 2013 18:28:28 +0000 (11:28 -0700)]
fix test
I intentionally changed the semantics of the code that affected this
test, but didn't update the test. Oops.
Evan Martin [Thu, 11 Apr 2013 17:03:48 +0000 (10:03 -0700)]
windows build fix
How did this ever work?
Scott Graham [Thu, 11 Apr 2013 03:16:24 +0000 (20:16 -0700)]
try again on vs2012 build fixes
Evan Martin [Wed, 10 Apr 2013 19:51:04 +0000 (12:51 -0700)]
build ninja itself in deps mode
Hopefully will help flush out bugs.
Evan Martin [Wed, 10 Apr 2013 19:49:23 +0000 (12:49 -0700)]
always use output timestamp for deps
Using the timestamp of the .d file was wrong. It can be written
at a different time than the output, and it is immediately deleted
after parsing; only the output remains for subsequent timestamp
comparison purposes, so always use the output's timestamp. (This
is how the code worked on Windows already.)
Evan Martin [Wed, 10 Apr 2013 19:10:10 +0000 (12:10 -0700)]
include mtimes in deplog explain
Evan Martin [Wed, 10 Apr 2013 17:08:51 +0000 (10:08 -0700)]
slightly smaller subsections
Evan Martin [Wed, 10 Apr 2013 17:03:55 +0000 (10:03 -0700)]
move pool docs down under "more details"
The earlier section is a tutorial-style overview. The latter section
is for side features like phony rules and header dependencies. Pools
fit in with the latter.
Evan Martin [Wed, 10 Apr 2013 17:02:27 +0000 (10:02 -0700)]
more minor manual touchups
Evan Martin [Wed, 10 Apr 2013 16:43:25 +0000 (09:43 -0700)]
make unittest match module name
Evan Martin [Wed, 10 Apr 2013 16:43:07 +0000 (09:43 -0700)]
mention mtimes
Evan Martin [Wed, 10 Apr 2013 16:34:34 +0000 (09:34 -0700)]
monospace flags
Evan Martin [Wed, 10 Apr 2013 16:31:23 +0000 (09:31 -0700)]
more windows doc updates
Evan Martin [Tue, 9 Apr 2013 17:15:18 +0000 (10:15 -0700)]
update some windows references in the docs
Drop the timing info, it's too variable to commit to a manual.
Evan Martin [Tue, 9 Apr 2013 17:07:17 +0000 (10:07 -0700)]
bigger manual
Nico Weber [Tue, 9 Apr 2013 19:45:46 +0000 (12:45 -0700)]
Merge pull request #539 from nico/typo
fix typo in comment
Nico Weber [Tue, 9 Apr 2013 19:44:31 +0000 (12:44 -0700)]
fix typo in comment
Evan Martin [Tue, 9 Apr 2013 19:39:09 +0000 (12:39 -0700)]
Merge pull request #537 from yannicklm/master
ninja.vim: add deps as keyword
yannicklm [Tue, 9 Apr 2013 18:13:48 +0000 (20:13 +0200)]
ninja.vim: add deps as keyword
new in ninja 1.3
Evan Martin [Tue, 9 Apr 2013 18:02:53 +0000 (11:02 -0700)]
Merge pull request #535 from sgraham/fix-windows-depslog
fix windows build after depslog
Scott Graham [Tue, 9 Apr 2013 17:44:54 +0000 (10:44 -0700)]
fix test
Evan Martin [Tue, 9 Apr 2013 17:35:24 +0000 (10:35 -0700)]
Merge pull request #534 from nico/invalid_log
On invalid depslog header, restart build instead of showing an error.
Scott Graham [Tue, 9 Apr 2013 17:05:23 +0000 (10:05 -0700)]
add ifdef around console_
Scott Graham [Tue, 9 Apr 2013 17:03:46 +0000 (10:03 -0700)]
fix windows build after depslog
Nico Weber [Tue, 9 Apr 2013 16:58:54 +0000 (09:58 -0700)]
On invalid depslog header, restart build instead of showing an error.
Also add tests for invalid headers.
Evan Martin [Tue, 9 Apr 2013 16:33:35 +0000 (09:33 -0700)]
document deps
Evan Martin [Tue, 9 Apr 2013 15:57:02 +0000 (08:57 -0700)]
Merge branch 'dep-pipeless'
This merges a new mechanism for tracking "depfile" dependencies that
is faster on all platforms but dramatically so on Windows.
Evan Martin [Tue, 9 Apr 2013 04:57:45 +0000 (21:57 -0700)]
Merge pull request #532 from nico/sshhh_gtest
Make test runner less chatty.
Nico Weber [Tue, 9 Apr 2013 04:53:25 +0000 (21:53 -0700)]
Try to fix build on Linux more.
Nico Weber [Tue, 9 Apr 2013 04:48:51 +0000 (21:48 -0700)]
Try to fix build on Linux.
Evan Martin [Tue, 9 Apr 2013 04:43:49 +0000 (21:43 -0700)]
add a straightforward deps log test, fix the other one
The first test I wrote was wrong; write a simpler test that exercises
the "no failures" code paths, then fix the second test and the bugs it
exposed.
Nico Weber [Tue, 9 Apr 2013 04:41:50 +0000 (21:41 -0700)]
Make ninja_test output nicer.
Nico Weber [Tue, 9 Apr 2013 04:28:12 +0000 (21:28 -0700)]
Use LinePrinter in test runner.
Nico Weber [Tue, 9 Apr 2013 04:19:27 +0000 (21:19 -0700)]
Make LinePrinter members private, add comments.
Nico Weber [Tue, 9 Apr 2013 04:14:29 +0000 (21:14 -0700)]
move printing of new lines into LinePrinter.
Nico Weber [Tue, 9 Apr 2013 00:18:30 +0000 (17:18 -0700)]
Write the depslog version in binary instead of text.
This way, it doubles as a byte-order marker. The header is now exactly one
line in a hex editor, and it's still relatively easy to look at the version
in a text editor.
Nico Weber [Tue, 9 Apr 2013 04:11:34 +0000 (21:11 -0700)]
refactor; no intended functionality change
Nico Weber [Tue, 9 Apr 2013 03:54:28 +0000 (20:54 -0700)]
move single-line printing to new class
Nico Weber [Tue, 9 Apr 2013 04:08:19 +0000 (21:08 -0700)]
Make deps=gcc without depfile an error.
When I first played with depslog, I accidentally removed the depfile attribute
on my cc edges, which had the effect of ninja silently ignoring all depfiles.
Instead, let ninja complain about edges that have deps set to gcc and depfile
set to nothing.
This is done at edge build time, instead of at mainfest load time, because
adding this check to ParseEdge() regressed empty build time for target 'chrome'
by 30ms. The check is only useful for generator authors, regular users should
never see this.
Evan Martin [Mon, 8 Apr 2013 17:20:58 +0000 (10:20 -0700)]
add a test for the "deps out of date" case
It touched the various remaining XXXes in the code, hooray.
Nico Weber [Tue, 9 Apr 2013 01:02:05 +0000 (18:02 -0700)]
Make gtest output more silent, ninja issue #528.
This is just a proof-of-concept. The terminal printing logic should be
extracted from src/build.cc and then reused here.
Evan Martin [Fri, 5 Apr 2013 21:08:41 +0000 (14:08 -0700)]
add a test verifying build failure on bad deps
Evan Martin [Fri, 5 Apr 2013 17:27:22 +0000 (10:27 -0700)]
make it an error for now to have multiple outputs with depslog
Evan Martin [Tue, 19 Feb 2013 18:00:05 +0000 (10:00 -0800)]
only write deps log if edge is in deps log mode
Evan Martin [Sun, 17 Feb 2013 23:13:35 +0000 (15:13 -0800)]
use logged deps mtime in dirty calculation
The idea here is that it's possible for a build to complete (writing
its output) but then for Ninja to get interrupted before writing out
the updated dependency information. In that case the mtime stored in
the deps log (if any) will match the previous output, and we'll know
we need to rebuild the output just to get the deps updated.