platform/upstream/ninja.git
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 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 agouse !defined(NOT_PPOLL)
David Hill [Mon, 1 Jul 2013 20:05:30 +0000 (16:05 -0400)]
use !defined(NOT_PPOLL)

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.

11 years agoshare platform support between configure/bootstrap
Patrick von Reth [Tue, 30 Apr 2013 15:29:13 +0000 (08:29 -0700)]
share platform support between configure/bootstrap

11 years agoMerge pull request #562 from TheOneRing/fixed-include
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

11 years agoadded missing windows include
Patrick von Reth [Tue, 30 Apr 2013 07:44:11 +0000 (09:44 +0200)]
added missing windows include

11 years agoMerge pull request #559 from nico/9_9
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.

11 years agoFix Windows build more.
Nico Weber [Mon, 29 Apr 2013 17:20:55 +0000 (10:20 -0700)]
Fix Windows build more.

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

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

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

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

11 years agoMake sure that recompaction writes a pristine new depslog.
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.

11 years agoDon't crash during deps log recompaction if there's more than one deps entry.
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.

11 years agodon't count eof as truncated
Evan Martin [Sat, 27 Apr 2013 21:37:26 +0000 (14:37 -0700)]
don't count eof as truncated

11 years agofix warning
Evan Martin [Sat, 27 Apr 2013 21:27:24 +0000 (14:27 -0700)]
fix warning

11 years agodeps log: recover on truncated entry
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.

11 years agodisable SubprocessTest.SetWithLots on travis-ci
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.

11 years agoadd a test for truncated deps
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.

11 years agomake DepsLogTest actually clean up on teardown
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.

11 years agotravis: pull in gtest before building
Evan Martin [Mon, 22 Apr 2013 15:12:09 +0000 (08:12 -0700)]
travis: pull in gtest before building

11 years agoadd a .travis.yml, trying out travis-ci.org
Evan Martin [Mon, 22 Apr 2013 15:06:37 +0000 (08:06 -0700)]
add a .travis.yml, trying out travis-ci.org

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

11 years agokeep dry run more similar to normal run
Nico Weber [Mon, 22 Apr 2013 05:03:20 +0000 (22:03 -0700)]
keep dry run more similar to normal run

11 years agoDon't record deps in dry runs.
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.

11 years agoadjust the wording in "multiple rules generate X" warning
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.

11 years agomake DiskInterfaceTest.StatBadPath quiet
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.

11 years agodrop std:: qualifiers on more stl datatypes
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.