platform/upstream/ninja.git
10 years agoFix for missing "no work to do." message if all build edges are phony rules.
Richard Geary [Sun, 11 Aug 2013 00:14:49 +0000 (20:14 -0400)]
Fix for missing "no work to do." message if all build edges are phony rules.
Added NestedPhonyPrintsDone unit test

10 years agoAdd to .gitignore : SublimeText project files, *.patch files, ..ninja_deps, .ninja_log
Richard Geary [Sun, 11 Aug 2013 00:13:41 +0000 (20:13 -0400)]
Add to .gitignore : SublimeText project files, *.patch files, ..ninja_deps, .ninja_log

11 years agoMerge pull request #627 from idealisms/master
Evan Martin [Fri, 26 Jul 2013 22:32:39 +0000 (15:32 -0700)]
Merge pull request #627 from idealisms/master

Fix the browse tool.

11 years agoFix the browse tool.
Tony Chang [Fri, 26 Jul 2013 21:24:52 +0000 (14:24 -0700)]
Fix the browse tool.

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.

11 years agoMerge pull request #626 from nico/logwrite
Evan Martin [Wed, 24 Jul 2013 22:38:12 +0000 (15:38 -0700)]
Merge pull request #626 from nico/logwrite

Build log write error checking.

11 years agoBuild log write error checking.
Nico Weber [Wed, 24 Jul 2013 21:07:12 +0000 (14:07 -0700)]
Build log write error checking.

Like f6f00aa40f0c541df06, but for the build log instead of the deps log.

11 years agoMerge pull request #612 from maximuska/proposed/deps_log_write_errors_checking
Nico Weber [Wed, 24 Jul 2013 20:30:29 +0000 (13:30 -0700)]
Merge pull request #612 from maximuska/proposed/deps_log_write_errors_checking

Proposed/deps log write errors checking

11 years agoMerge pull request #625 from nico/land
Nico Weber [Sat, 20 Jul 2013 19:14:07 +0000 (12:14 -0700)]
Merge pull request #625 from nico/land

Merge pull request #617.

11 years agoAdd test for correct restat logic
Chris Hopman [Tue, 16 Jul 2013 23:00:28 +0000 (16:00 -0700)]
Add test for correct restat logic

When a single output of an edge is dirty, the restat check should
leave all outputs of that edge dirty.

11 years agoFix restat dirty check logic for edges with multiple outputs
Chris Hopman [Wed, 3 Jul 2013 21:26:25 +0000 (14:26 -0700)]
Fix restat dirty check logic for edges with multiple outputs

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.

11 years agoMerge pull request #624 from nico/landmaxim
Nico Weber [Sat, 20 Jul 2013 04:47:00 +0000 (21:47 -0700)]
Merge pull request #624 from nico/landmaxim

Land the first two commits of pull request #608.

11 years agominor: removing noop call to MarkDirty(), fixing comment
Maxim Kalaev [Fri, 28 Jun 2013 17:48:30 +0000 (20:48 +0300)]
minor: removing noop call to MarkDirty(), fixing comment

11 years agoRemoving a redundant stat() call with 'deps' and 'restat = 1'
Maxim Kalaev [Thu, 27 Jun 2013 18:55:38 +0000 (21:55 +0300)]
Removing a redundant stat() call with 'deps' and 'restat = 1'

11 years agoMerge pull request #623 from nico/fix
Nico Weber [Fri, 19 Jul 2013 00:54:33 +0000 (17:54 -0700)]
Merge pull request #623 from nico/fix

Fix diagnostic formatting regression caused by adaa91a33eb2cf23b88.

11 years agoFix diagnostic formatting regression caused by adaa91a33eb2cf23b88.
Nico Weber [Fri, 19 Jul 2013 00:51:10 +0000 (17:51 -0700)]
Fix diagnostic formatting regression caused by adaa91a33eb2cf23b88.

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.

11 years agoMerge pull request #622 from nico/test
Nico Weber [Thu, 18 Jul 2013 21:41:16 +0000 (14:41 -0700)]
Merge pull request #622 from nico/test

Add test for a manifest ending in the middle of a keyword.

11 years agoAdd test for a manifest ending in the middle of a keyword.
Nico Weber [Thu, 18 Jul 2013 21:39:41 +0000 (14:39 -0700)]
Add test for a manifest ending in the middle of a keyword.

11 years agoMerge pull request #621 from nico/ninjaload
Evan Martin [Thu, 18 Jul 2013 20:36:58 +0000 (13:36 -0700)]
Merge pull request #621 from nico/ninjaload

Reuse ManifestParser::Load() in ManifestParser::ParseFileInclude().

11 years agoAdd back contents.resize(), but with a comment and just 1 instead of 10.
Nico Weber [Thu, 18 Jul 2013 00:55:36 +0000 (17:55 -0700)]
Add back contents.resize(), but with a comment and just 1 instead of 10.

11 years agoLet the ".ninja parse" metric include the time to read the toplevel ninja file.
Nico Weber [Thu, 11 Jul 2013 00:43:29 +0000 (17:43 -0700)]
Let the ".ninja parse" metric include the time to read the toplevel ninja file.

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.

11 years agoReuse ManifestParser::Load() in ManifestParser::ParseFileInclude().
Nico Weber [Thu, 11 Jul 2013 00:30:16 +0000 (17:30 -0700)]
Reuse ManifestParser::Load() in ManifestParser::ParseFileInclude().

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.

11 years agoMerge pull request #616 from nico/recompact
Evan Martin [Mon, 8 Jul 2013 20:55:23 +0000 (13:55 -0700)]
Merge pull request #616 from nico/recompact

Add a 'recompact' tool, which forces recompaction of the build and deps ...

11 years agoMerge pull request #614 from nico/pooldoc
Evan Martin [Mon, 8 Jul 2013 20:53:22 +0000 (13:53 -0700)]
Merge pull request #614 from nico/pooldoc

Mention pools in the discussion of ninja's toplevel declarations.

11 years agoMerge pull request #611 from nico/testparse
Evan Martin [Mon, 8 Jul 2013 20:53:04 +0000 (13:53 -0700)]
Merge pull request #611 from nico/testparse

Improve error message for duplicate rules and unknown pools.

11 years agoIntroducing tool 'deps' dumping ninja deps log entries
Maxim Kalaev [Sun, 30 Jun 2013 19:59:54 +0000 (22:59 +0300)]
Introducing tool 'deps' dumping ninja deps log entries

11 years agoAdd a 'recompact' tool, which forces recompaction of the build and deps logs.
Nico Weber [Mon, 8 Jul 2013 19:34:46 +0000 (12:34 -0700)]
Add a 'recompact' tool, which forces recompaction of the build and deps logs.

This is useful for performance comparisons between two build directories.

11 years agoMerge pull request #615 from mdempsky/strict-murmur
Nico Weber [Mon, 8 Jul 2013 18:58:18 +0000 (11:58 -0700)]
Merge pull request #615 from mdempsky/strict-murmur

Fix murmur hash implementations to work on strict alignment architectures

11 years agoFix murmur hash implementations to work on strict alignment
Matthew Dempsky [Mon, 8 Jul 2013 17:47:57 +0000 (10:47 -0700)]
Fix murmur hash implementations to work on strict alignment
architectures like OpenBSD/mips64el and OpenBSD/hppa64.

11 years agoMention pools in the discussion of ninja's toplevel declarations.
Nico Weber [Sun, 7 Jul 2013 19:22:38 +0000 (12:22 -0700)]
Mention pools in the discussion of ninja's toplevel declarations.

11 years agoImprove error message for duplicate rules and unknown pools.
Nico Weber [Tue, 2 Jul 2013 22:43:40 +0000 (15:43 -0700)]
Improve error message for duplicate rules and unknown pools.

Also add more tests for invalid manifests. According to gcov, these invalid
inputs weren't tested before.

11 years agoMerge pull request #610 from rnk/wstr
Nico Weber [Tue, 2 Jul 2013 18:13:00 +0000 (11:13 -0700)]
Merge pull request #610 from rnk/wstr

Use fwrite to print whatever the subcommand wrote

11 years agoUse fwrite to print whatever the subcommand wrote
Reid Kleckner [Tue, 2 Jul 2013 06:00:22 +0000 (02:00 -0400)]
Use fwrite to print whatever the subcommand wrote

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.

11 years agoMerge pull request #607 from dajohi/master
Nico Weber [Mon, 1 Jul 2013 21:34:05 +0000 (14:34 -0700)]
Merge pull request #607 from dajohi/master

Support Bitrig

11 years agoAdding checks for record overflow in deps_log
Maxim Kalaev [Mon, 1 Jul 2013 21:09:43 +0000 (00:09 +0300)]
Adding checks for record overflow in deps_log

11 years agouse !defined(NOT_PPOLL)
David Hill [Mon, 1 Jul 2013 20:05:30 +0000 (16:05 -0400)]
use !defined(NOT_PPOLL)

11 years agoAdding error checking on fwrite/fflush in deps_log
Maxim Kalaev [Mon, 1 Jul 2013 18:33:12 +0000 (21:33 +0300)]
Adding error checking on fwrite/fflush in deps_log

11 years agoExclude Windows as well
David Hill [Mon, 1 Jul 2013 18:11:05 +0000 (14:11 -0400)]
Exclude Windows as well

11 years agough, missing #
David Hill [Sat, 29 Jun 2013 23:21:15 +0000 (19:21 -0400)]
ugh, missing #

11 years agocleanup based on comments from martine
David Hill [Sat, 29 Jun 2013 23:16:51 +0000 (19:16 -0400)]
cleanup based on comments from martine

11 years agosupport Bitrig
David Hill [Sat, 29 Jun 2013 21:34:51 +0000 (17:34 -0400)]
support Bitrig

11 years agoMerge pull request #601 from nico/109fix
Nico Weber [Sat, 22 Jun 2013 00:42:15 +0000 (17:42 -0700)]
Merge pull request #601 from nico/109fix

Add stdlib.h include for atol().

11 years agoAdd stdlib.h include for atol().
Nico Weber [Sat, 22 Jun 2013 00:40:40 +0000 (17:40 -0700)]
Add stdlib.h include for atol().

This attempts to fix issue #600. `man atol` claims that atol() is in
stdlib.h, which wasn't included yet.

11 years agoMerge pull request #596 from nico/chunk
Evan Martin [Fri, 14 Jun 2013 06:17:10 +0000 (23:17 -0700)]
Merge pull request #596 from nico/chunk

Make sure to not write partial deps entries.

11 years agoMake sure to not write partial deps entries.
Nico Weber [Fri, 14 Jun 2013 05:11:34 +0000 (22:11 -0700)]
Make sure to not write partial deps entries.

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.

11 years agoMerge pull request #593 from nico/moretest
Evan Martin [Thu, 6 Jun 2013 17:54:53 +0000 (10:54 -0700)]
Merge pull request #593 from nico/moretest

Add a test for CreatePhonyInEdge() in depsmode path.

11 years agoAdd a test for CreatePhonyInEdge() in depsmode path.
Nico Weber [Thu, 6 Jun 2013 01:51:00 +0000 (18:51 -0700)]
Add a test for CreatePhonyInEdge() in depsmode path.

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.

11 years agoMerge pull request #592 from nico/addtest
Nico Weber [Thu, 6 Jun 2013 01:28:00 +0000 (18:28 -0700)]
Merge pull request #592 from nico/addtest

Add test that proves `node->AddOutEdge(edge);` in `LoadDepFile()` is nee...

11 years agoAdd test that proves `node->AddOutEdge(edge);` in `LoadDepFile()` is needed.
Nico Weber [Mon, 3 Jun 2013 23:56:46 +0000 (16:56 -0700)]
Add test that proves `node->AddOutEdge(edge);` in `LoadDepFile()` is needed.

No functionality change. Related to issue #590.

11 years agoMerge pull request #591 from nico/fixrestat
Nico Weber [Tue, 4 Jun 2013 01:54:30 +0000 (18:54 -0700)]
Merge pull request #591 from nico/fixrestat

Fix restat builds with edges generating headers depended on through deps...

11 years agoFix restat builds with edges generating headers depended on through deps files
Nico Weber [Mon, 3 Jun 2013 23:37:57 +0000 (16:37 -0700)]
Fix restat builds with edges generating headers depended on through deps files
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.

11 years agoMerge pull request #589 from nico/wincase
Nico Weber [Wed, 29 May 2013 17:20:56 +0000 (10:20 -0700)]
Merge pull request #589 from nico/wincase

Stop `-t msvc -o` from lowercasing paths from /showIncludes output.

11 years agoStop `-t msvc -o` from lowercasing paths from /showIncludes output.
Nico Weber [Wed, 29 May 2013 14:37:06 +0000 (07:37 -0700)]
Stop `-t msvc -o` from lowercasing paths from /showIncludes output.

/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.
\vBefore 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.)

11 years agoMerge pull request #586 from grimmy/master
Evan Martin [Wed, 29 May 2013 03:18:03 +0000 (20:18 -0700)]
Merge pull request #586 from grimmy/master

Build fails on Debian/kfreebsd

11 years agoMerge pull request #588 from jonforums/mingw-fix
Evan Martin [Sat, 25 May 2013 15:30:57 +0000 (08:30 -0700)]
Merge pull request #588 from jonforums/mingw-fix

Fix mingw based builds. Fixes #587

11 years agoFix mingw based builds. Fixes #587
Jon [Sat, 25 May 2013 14:29:24 +0000 (10:29 -0400)]
Fix mingw based builds. Fixes #587

11 years agoFixed the build on Debian/kfreebsd
Gary Kramlich [Sat, 25 May 2013 09:46:36 +0000 (04:46 -0500)]
Fixed the build on Debian/kfreebsd

11 years agorefactor ninja main() into a struct with methods
Evan Martin [Fri, 24 May 2013 23:32:49 +0000 (16:32 -0700)]
refactor ninja main() into a struct with methods

This removes the ugly Globals struct, and the ResetState() hack.
This also eliminates the only goto!

11 years agosimplify some ifdefs
Evan Martin [Thu, 23 May 2013 21:09:27 +0000 (14:09 -0700)]
simplify some ifdefs

11 years agofactor out flag parsing from enormous NinjaMain()
Evan Martin [Thu, 23 May 2013 21:06:27 +0000 (14:06 -0700)]
factor out flag parsing from enormous NinjaMain()

11 years agoMerge pull request #585 from nico/fixcrash
Nico Weber [Fri, 24 May 2013 01:25:09 +0000 (18:25 -0700)]
Merge pull request #585 from nico/fixcrash

Don't use va_start() with reference parameters, it's undefined behavior.

11 years agoDon't use va_start() with reference parameters, it's undefined behavior.
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.

11 years agoMerge pull request #470 from rgeary1/remotebrowser
Evan Martin [Thu, 23 May 2013 21:22:17 +0000 (14:22 -0700)]
Merge pull request #470 from rgeary1/remotebrowser

Ninja -t browse opens localhost in browser, which doesn't work when using ssh

11 years agoMerge pull request #578 from pinotree/remove-path-max
Evan Martin [Thu, 23 May 2013 21:15:55 +0000 (14:15 -0700)]
Merge pull request #578 from pinotree/remove-path-max

do not unconditionally use PATH_MAX with getcwd

11 years agoMerge pull request #583 from tru/add_force_pselect
Evan Martin [Thu, 23 May 2013 21:10:47 +0000 (14:10 -0700)]
Merge pull request #583 from tru/add_force_pselect

Added bootstrap/configure option to force pselect

11 years agoMerge pull request #579 from rui314/master
Evan Martin [Thu, 23 May 2013 21:09:55 +0000 (14:09 -0700)]
Merge pull request #579 from rui314/master

Minor fixes

11 years agoAdded bootstrap/configure option to force pselect
Tobias Hieta [Thu, 23 May 2013 13:12:53 +0000 (13:12 +0000)]
Added bootstrap/configure option to force pselect

All modern Linux kernels have ppoll() but sometimes
you might want to compile on something ancient.

This patch adds the possibility to force the use
of pselect() instead by passing --force-pselect
to bootstrap/configure.

The use of ppoll() is still default for Linux
and OpenBSD

11 years agoBrowse tool uses real hostname not localhost, to allow -t browse when using ssh
Richard Geary [Wed, 2 Jan 2013 21:27:36 +0000 (16:27 -0500)]
Browse tool uses real hostname not localhost, to allow -t browse when using ssh

Change-Id: Ic4be6527151a7ff68afab62e61951071ad5694b7

11 years agoremind myself to update the website when I make a release
Evan Martin [Tue, 21 May 2013 22:46:30 +0000 (15:46 -0700)]
remind myself to update the website when I make a release

11 years agoAdd error check for -j flag.
Rui Ueyama [Tue, 21 May 2013 18:27:59 +0000 (11:27 -0700)]
Add error check for -j flag.

11 years agoFix typo in HACKING.md
Rui Ueyama [Tue, 21 May 2013 18:27:42 +0000 (11:27 -0700)]
Fix typo in HACKING.md

11 years agodo not unconditionally use PATH_MAX with getcwd
Pino Toscano [Tue, 21 May 2013 10:23:22 +0000 (12:23 +0200)]
do not unconditionally use PATH_MAX with getcwd

Instead, grow a buffer until getcwd either succeeds or fails with an errno different than ERANGE
(meaning the passed buffer was too short to represent the actual path).
Reset errno before calling getcwd to check it eventually did not fail.

11 years agoMerge pull request #576 from nico/newlines
Evan Martin [Mon, 20 May 2013 16:32:52 +0000 (09:32 -0700)]
Merge pull request #576 from nico/newlines

Set stdout to binary mode in -t msvc.

11 years agoMerge pull request #577 from tfarina/structs
Evan Martin [Sun, 19 May 2013 16:09:23 +0000 (09:09 -0700)]
Merge pull request #577 from tfarina/structs

structs not classes.

11 years agostructs not classes.
Thiago Farina [Sun, 19 May 2013 16:02:48 +0000 (13:02 -0300)]
structs not classes.

For some reason that I do not, ninja prefers:

struct Foo {
  Foo();

 private:
  void Blah();
};

Rather than

class Foo {
 public:
  Foo();

 private:
  void Blah();
};

This catches the last two usages of "class" in the code base.

Signed-off-by: Thiago Farina <tfarina@chromium.org>
11 years agoSet stdout to binary mode in -t msvc.
Nico Weber [Fri, 17 May 2013 22:39:15 +0000 (15:39 -0700)]
Set stdout to binary mode in -t msvc.

Fixes issue #575.

11 years agoMerge pull request #574 from sgraham/no-extra-nl
Evan Martin [Fri, 17 May 2013 20:50:43 +0000 (13:50 -0700)]
Merge pull request #574 from sgraham/no-extra-nl

don't print output with extra newline

11 years agodon't print output with extra newline
Scott Graham [Fri, 17 May 2013 20:28:14 +0000 (13:28 -0700)]
don't print output with extra newline

11 years agoMerge pull request #573 from sgraham/truncate-win
Nico Weber [Fri, 17 May 2013 20:16:43 +0000 (13:16 -0700)]
Merge pull request #573 from sgraham/truncate-win

fix truncate compile error in ninja_test on windows

11 years agofix truncate compile error in ninja_test on windows
Scott Graham [Fri, 17 May 2013 20:14:07 +0000 (13:14 -0700)]
fix truncate compile error in ninja_test on windows

11 years agorequire version 1.3 for building ninja itself
Evan Martin [Fri, 17 May 2013 15:32:04 +0000 (08:32 -0700)]
require version 1.3 for building ninja itself

This catches the case where you use an older version on Ninja
to build a newer version of the Ninja code.
bootstrap.py always should work regardless.

11 years agoremind myself to push tags
Evan Martin [Thu, 16 May 2013 23:57:52 +0000 (16:57 -0700)]
remind myself to push tags

11 years agocall this version 1.3.0
Evan Martin [Thu, 16 May 2013 23:21:41 +0000 (16:21 -0700)]
call this version 1.3.0

11 years agodelete obsolete todo
Evan Martin [Fri, 3 May 2013 20:16:55 +0000 (13:16 -0700)]
delete obsolete todo

11 years agoMerge pull request #572 from nico/incless
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.

11 years agoRemove a few unused includes.
Nico Weber [Sun, 12 May 2013 03:40:26 +0000 (20:40 -0700)]
Remove a few unused includes.

11 years agoMerge pull request #568 from riannucci/fix_test
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)

11 years agoMerge pull request #570 from nico/fixdarwin
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.

11 years agoFix 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.

11 years agoFix Pool tests.
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.

11 years agoMerge pull request #565 from mdempsky/master
Evan Martin [Wed, 1 May 2013 21:50:38 +0000 (14:50 -0700)]
Merge pull request #565 from mdempsky/master

Add support for OpenBSD.

11 years agoDon't poll pipes using POLLRDHUP
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.

11 years agoMerge pull request #566 from nico/tweak
Nico Weber [Wed, 1 May 2013 18:52:45 +0000 (11:52 -0700)]
Merge pull request #566 from nico/tweak

minor formatting change

11 years agominor formatting change
Nico Weber [Wed, 1 May 2013 18:51:51 +0000 (11:51 -0700)]
minor formatting change

11 years agoMerge pull request #563 from nico/recompact-deps
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.

11 years agoAdd support for OpenBSD.
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.

11 years agoRecompact the deps log when it gets too big.
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.

11 years agoKeep a DepsLog's data valid after a call to DepsLog::Recompact().
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().

11 years agoLet DepsLog::RecordDeps() update its in-memory representation.
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.

11 years agoMove updating DepsLog's deps_ array into its own function.
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.

11 years agoMove some DepsLog::Deps initialization code into its constructor.
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.