platform/upstream/ninja.git
11 years agofix test
Scott Graham [Tue, 9 Apr 2013 17:44:54 +0000 (10:44 -0700)]
fix test

11 years agoadd ifdef around console_
Scott Graham [Tue, 9 Apr 2013 17:05:23 +0000 (10:05 -0700)]
add ifdef around console_

11 years agofix windows build after depslog
Scott Graham [Tue, 9 Apr 2013 17:03:46 +0000 (10:03 -0700)]
fix windows build after depslog

11 years agodocument deps
Evan Martin [Tue, 9 Apr 2013 16:33:35 +0000 (09:33 -0700)]
document deps

11 years agoMerge branch 'dep-pipeless'
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.

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

11 years agoTry to fix build on Linux more.
Nico Weber [Tue, 9 Apr 2013 04:53:25 +0000 (21:53 -0700)]
Try to fix build on Linux more.

11 years agoTry to fix build on Linux.
Nico Weber [Tue, 9 Apr 2013 04:48:51 +0000 (21:48 -0700)]
Try to fix build on Linux.

11 years agoadd a straightforward deps log test, fix the other one
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.

11 years agoMake ninja_test output nicer.
Nico Weber [Tue, 9 Apr 2013 04:41:50 +0000 (21:41 -0700)]
Make ninja_test output nicer.

11 years agoUse LinePrinter in test runner.
Nico Weber [Tue, 9 Apr 2013 04:28:12 +0000 (21:28 -0700)]
Use LinePrinter in test runner.

11 years agoMake LinePrinter members private, add comments.
Nico Weber [Tue, 9 Apr 2013 04:19:27 +0000 (21:19 -0700)]
Make LinePrinter members private, add comments.

11 years agomove printing of new lines into LinePrinter.
Nico Weber [Tue, 9 Apr 2013 04:14:29 +0000 (21:14 -0700)]
move printing of new lines into LinePrinter.

11 years agoWrite the depslog version in binary instead of text.
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.

11 years agorefactor; no intended functionality change
Nico Weber [Tue, 9 Apr 2013 04:11:34 +0000 (21:11 -0700)]
refactor; no intended functionality change

11 years agomove single-line printing to new class
Nico Weber [Tue, 9 Apr 2013 03:54:28 +0000 (20:54 -0700)]
move single-line printing to new class

11 years agoMake deps=gcc without depfile an error.
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.

11 years agoadd a test for the "deps out of date" case
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.

11 years agoMake gtest output more silent, ninja issue #528.
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.

11 years agoadd a test verifying build failure on bad deps
Evan Martin [Fri, 5 Apr 2013 21:08:41 +0000 (14:08 -0700)]
add a test verifying build failure on bad deps

11 years agomake it an error for now to have multiple outputs with depslog
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

11 years agoonly write deps log if edge is in deps log mode
Evan Martin [Tue, 19 Feb 2013 18:00:05 +0000 (10:00 -0800)]
only write deps log if edge is in deps log mode

11 years agouse logged deps mtime in dirty calculation
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.

11 years agodon't call .front() on an empty vector
Evan Martin [Sun, 17 Feb 2013 21:19:53 +0000 (13:19 -0800)]
don't call .front() on an empty vector

Fixes a gcc debug-mode assertion.

11 years agohook up depslog writing into build process
Evan Martin [Sun, 17 Feb 2013 20:53:40 +0000 (12:53 -0800)]
hook up depslog writing into build process

11 years agorename "special" to "deps"
Evan Martin [Sun, 17 Feb 2013 20:09:54 +0000 (12:09 -0800)]
rename "special" to "deps"

11 years agomissing header
Evan Martin [Sat, 16 Feb 2013 22:34:49 +0000 (14:34 -0800)]
missing header

11 years agoremove depfiles files as they're parsed
Evan Martin [Tue, 15 Jan 2013 02:00:52 +0000 (18:00 -0800)]
remove depfiles files as they're parsed

11 years agodepslog: track dead record count
Evan Martin [Wed, 9 Jan 2013 01:52:44 +0000 (17:52 -0800)]
depslog: track dead record count

11 years agoadd recompaction to depslog
Evan Martin [Tue, 8 Jan 2013 16:43:39 +0000 (08:43 -0800)]
add recompaction to depslog

Not done automatically yet, just an implementation and a test.

11 years agoclarify depslog overview
Evan Martin [Tue, 8 Jan 2013 16:20:56 +0000 (08:20 -0800)]
clarify depslog overview

11 years agomake old deps format migration actually work
Evan Martin [Tue, 8 Jan 2013 16:17:12 +0000 (08:17 -0800)]
make old deps format migration actually work

11 years agorecord and check depslog file version
Evan Martin [Mon, 7 Jan 2013 19:04:24 +0000 (11:04 -0800)]
record and check depslog file version

Future-proofing against some change we may need to make later.

11 years agodon't write out deps entries if nothing changed
Evan Martin [Mon, 7 Jan 2013 18:59:27 +0000 (10:59 -0800)]
don't write out deps entries if nothing changed

Shortcuts a common case.

11 years agowindows: drop use of msvc helper in build
Evan Martin [Sun, 6 Jan 2013 23:33:46 +0000 (15:33 -0800)]
windows: drop use of msvc helper in build

11 years agouse special=anything to trigger loading from depslog
Evan Martin [Sun, 6 Jan 2013 23:26:20 +0000 (15:26 -0800)]
use special=anything to trigger loading from depslog

11 years agowindows: use CLParser to extract deps during build
Evan Martin [Sun, 6 Jan 2013 23:21:07 +0000 (15:21 -0800)]
windows: use CLParser to extract deps during build

11 years agorefactor build-time deps-extraction
Evan Martin [Sun, 6 Jan 2013 19:42:40 +0000 (11:42 -0800)]
refactor build-time deps-extraction

11 years agofactor MSVC parsing out of CLWrapper into CLParser
Evan Martin [Sun, 6 Jan 2013 19:36:17 +0000 (11:36 -0800)]
factor MSVC parsing out of CLWrapper into CLParser

11 years agowindows: add uint16 casts in depslog
Evan Martin [Sat, 5 Jan 2013 18:49:48 +0000 (10:49 -0800)]
windows: add uint16 casts in depslog

11 years agoadd "special=gcc" attribute, use to load depslog
Evan Martin [Fri, 4 Jan 2013 17:39:01 +0000 (09:39 -0800)]
add "special=gcc" attribute, use to load depslog

11 years agotrack deps log load time in metrics
Evan Martin [Sun, 30 Dec 2012 20:50:43 +0000 (12:50 -0800)]
track deps log load time in metrics

11 years agoexpand DepsLog test, fix two bugs it revealed
Evan Martin [Sun, 30 Dec 2012 20:48:44 +0000 (12:48 -0800)]
expand DepsLog test, fix two bugs it revealed

11 years agoplumb DepsLog load through Builder
Evan Martin [Sun, 30 Dec 2012 18:15:49 +0000 (10:15 -0800)]
plumb DepsLog load through Builder

11 years agono error if deps log doesn't exist
Evan Martin [Sun, 30 Dec 2012 18:11:13 +0000 (10:11 -0800)]
no error if deps log doesn't exist

11 years agoload deps log at startup
Evan Martin [Sun, 30 Dec 2012 18:10:03 +0000 (10:10 -0800)]
load deps log at startup

11 years agofactor out creation of build directory
Evan Martin [Sun, 30 Dec 2012 17:53:57 +0000 (09:53 -0800)]
factor out creation of build directory

11 years agouse DepsLog in loading dependencies
Evan Martin [Sat, 29 Dec 2012 19:55:52 +0000 (11:55 -0800)]
use DepsLog in loading dependencies

WIP

11 years agofactor out implicit dep loading
Evan Martin [Sat, 29 Dec 2012 19:24:03 +0000 (11:24 -0800)]
factor out implicit dep loading

11 years agopass command results via a struct
Evan Martin [Sat, 29 Dec 2012 18:53:59 +0000 (10:53 -0800)]
pass command results via a struct

WaitForCommand now passes all command output via a struct.
This will allow adding more output in a future change.

11 years agoadd DepsLog, a new data structure for dependency information
Evan Martin [Mon, 17 Dec 2012 17:08:15 +0000 (09:08 -0800)]
add DepsLog, a new data structure for dependency information

DepsLog is a compact serialization of dependency information.
It can be used to replace depfiles for faster loading.

11 years agosync version number in master with release
Evan Martin [Mon, 8 Apr 2013 21:44:30 +0000 (14:44 -0700)]
sync version number in master with release

Update RELEASING with notes on how to not screw this up again.

11 years agosplit FakeCommandRunner out of BuildTest
Evan Martin [Mon, 8 Apr 2013 21:15:36 +0000 (14:15 -0700)]
split FakeCommandRunner out of BuildTest

Separating concerns to make a subsequent refactoring easier.

11 years agomove test virtual time "now_" into VirtualFileSystem
Evan Martin [Mon, 8 Apr 2013 21:05:27 +0000 (14:05 -0700)]
move test virtual time "now_" into VirtualFileSystem

It's the only piece that cares about the current time.

11 years agoMerge pull request #527 from wang-bin/compile_fix
Evan Martin [Mon, 8 Apr 2013 21:17:27 +0000 (14:17 -0700)]
Merge pull request #527 from wang-bin/compile_fix

fix compile error about noreturn on windows

11 years agofix compile error about noreturn on windows
wang-bin [Sun, 7 Apr 2013 03:14:16 +0000 (11:14 +0800)]
fix compile error about noreturn on windows

11 years agoMerge pull request #526 from RedX2501/improved_bash_completion
Evan Martin [Sat, 6 Apr 2013 14:46:08 +0000 (07:46 -0700)]
Merge pull request #526 from RedX2501/improved_bash_completion

Improved bash completion when using tools like '-t clean'

11 years agoImproved bash completion when using tools like '-t clean'
Guilherme Bufolo [Sat, 6 Apr 2013 11:47:18 +0000 (13:47 +0200)]
Improved bash completion when using tools like '-t clean'

11 years agorefactor some of the output mtime-handling code
Evan Martin [Sun, 17 Feb 2013 23:02:31 +0000 (15:02 -0800)]
refactor some of the output mtime-handling code

Reduces duplicated explain output.

11 years agoadd noreturn attr on Fatal()
Evan Martin [Sun, 17 Feb 2013 20:59:23 +0000 (12:59 -0800)]
add noreturn attr on Fatal()

11 years agodecided against using XXX in the manual for unknown versions
Evan Martin [Fri, 5 Apr 2013 17:07:48 +0000 (10:07 -0700)]
decided against using XXX in the manual for unknown versions

11 years agotag a feature with the right version number
Evan Martin [Fri, 5 Apr 2013 16:27:06 +0000 (09:27 -0700)]
tag a feature with the right version number

11 years agoMerge pull request #525 from nico/escapedollar
Evan Martin [Tue, 2 Apr 2013 17:40:19 +0000 (10:40 -0700)]
Merge pull request #525 from nico/escapedollar

Dollar signs in depfiles are escaped as "$$", not "\$".

11 years agoDollar signs in depfiles are escaped as "$$", not "\$".
Nico Weber [Tue, 2 Apr 2013 16:39:05 +0000 (09:39 -0700)]
Dollar signs in depfiles are escaped as "$$", not "\$".

See http://llvm.org/PR15642. I checked that gcc does produce depfiles
containing "$$" for files with "$" signs in their name (and as of
r178540, so does clang). I also checked that .d files that escape dollar
signs with "\$" are not read correctly by make.

11 years agoallow paths with '!' in depfiles
Evan Martin [Sat, 30 Mar 2013 23:36:47 +0000 (16:36 -0700)]
allow paths with '!' in depfiles

See funny paths in
  https://github.com/google/libcxx/tree/master/test/iterators/stream.iterators/istreambuf.iterator/

11 years agoMerge pull request #522 from nico/spelldebug
Evan Martin [Thu, 28 Mar 2013 00:11:08 +0000 (17:11 -0700)]
Merge pull request #522 from nico/spelldebug

Add spell checking for debug flags.

11 years agoAdd spell checking for debug flags.
Nico Weber [Wed, 27 Mar 2013 23:03:52 +0000 (16:03 -0700)]
Add spell checking for debug flags.

I just used `ninja -d stat` and it took me a bit to realize that I missed the
trailing 's'.

While here, move the message printing from printf() to Error(). This makes the
output consistent with other error outputs: The messages are now prefixed with
"ninja: error: " instead of just "ninja: " and they go to stderr instead of
stdout.

11 years agoMerge pull request #521 from riannucci/ignore_duplicate_edges_in_shcedule_work
Evan Martin [Tue, 26 Mar 2013 17:40:08 +0000 (10:40 -0700)]
Merge pull request #521 from riannucci/ignore_duplicate_edges_in_shcedule_work

Fix duplicate edge Pool crash in the minimally invasive way

11 years agoAdd regression test
Robert Iannucci [Sat, 23 Mar 2013 21:35:10 +0000 (14:35 -0700)]
Add regression test

11 years agoFix debug build on linux (type strictness).
Robert Iannucci [Sat, 23 Mar 2013 21:31:05 +0000 (14:31 -0700)]
Fix debug build on linux (type strictness).

11 years agoFix Pool to use a set internally
Robert Iannucci [Mon, 18 Mar 2013 17:36:23 +0000 (10:36 -0700)]
Fix Pool to use a set internally

11 years agoFix duplicate edge Pool crash in the minimally invasive way
Robert Iannucci [Mon, 18 Mar 2013 16:53:53 +0000 (09:53 -0700)]
Fix duplicate edge Pool crash in the minimally invasive way

11 years agoMerge pull request #518 from syntheticpp/max-patch
Evan Martin [Thu, 14 Mar 2013 17:13:22 +0000 (10:13 -0700)]
Merge pull request #518 from syntheticpp/max-patch

Posix symbols are not enabled by default for MSVC

11 years agoPosix symbols are not enabled by default for MSVC
Peter Kümmel [Thu, 14 Mar 2013 15:29:59 +0000 (16:29 +0100)]
Posix symbols are not enabled by default for MSVC

11 years agoMerge pull request #513 from fifoforlifo/master
Evan Martin [Mon, 11 Mar 2013 20:47:37 +0000 (13:47 -0700)]
Merge pull request #513 from fifoforlifo/master

Adding elapsed time (%e) to NINJA_STATUS.

11 years agoAdded %e to manual.asciidoc, fixed brace style.
Avinash Baliga [Mon, 11 Mar 2013 05:15:46 +0000 (00:15 -0500)]
Added %e to manual.asciidoc, fixed brace style.

11 years agoMerge pull request #512 from pcc/compilation-database
Evan Martin [Sun, 10 Mar 2013 17:03:55 +0000 (10:03 -0700)]
Merge pull request #512 from pcc/compilation-database

Add compdb tool

11 years agoAdd compdb tool
Peter Collingbourne [Thu, 28 Feb 2013 08:28:23 +0000 (00:28 -0800)]
Add compdb tool

This tool helps convert Ninja build files to a compilation database
of the form used by Clang tooling.

11 years agoMerge pull request #499 from lht/patch-1
Evan Martin [Sun, 10 Mar 2013 00:50:34 +0000 (16:50 -0800)]
Merge pull request #499 from lht/patch-1

Fix typo in manual

11 years agoMerge pull request #503 from mo/fix_typo_20130219
Evan Martin [Sun, 10 Mar 2013 00:50:11 +0000 (16:50 -0800)]
Merge pull request #503 from mo/fix_typo_20130219

Fix typo, s/verison/version/

11 years agoMerge pull request #504 from benvanik/master
Evan Martin [Sun, 10 Mar 2013 00:49:49 +0000 (16:49 -0800)]
Merge pull request #504 from benvanik/master

Add a check for the VC++ 2012-style 64-bit path.

11 years agoMerge pull request #514 from dabrahams/patch-1
Evan Martin [Sun, 10 Mar 2013 00:20:59 +0000 (16:20 -0800)]
Merge pull request #514 from dabrahams/patch-1

Bring in declaration of atoi

11 years agoBring in declaration of atoi
Dave Abrahams [Fri, 8 Mar 2013 21:18:12 +0000 (13:18 -0800)]
Bring in declaration of atoi

./bootstrap.py fails on some platforms without this include

11 years agoMade %e purely a number.
Avinash Baliga [Mon, 4 Mar 2013 04:04:48 +0000 (22:04 -0600)]
Made %e purely a number.

11 years agoNINJA_STATUS now takes %e for elapsed time.
Avinash Baliga [Mon, 4 Mar 2013 03:33:19 +0000 (21:33 -0600)]
NINJA_STATUS now takes %e for elapsed time.

11 years agoMerge pull request #507 from ikarienator/master
Evan Martin [Sun, 24 Feb 2013 20:51:38 +0000 (12:51 -0800)]
Merge pull request #507 from ikarienator/master

Browse command does not parse URL correctly

11 years agoMerge pull request #502 from tfarina/rm-unused-fun
Evan Martin [Sun, 24 Feb 2013 17:50:56 +0000 (09:50 -0800)]
Merge pull request #502 from tfarina/rm-unused-fun

Removed unused UnitsWaiting() function from State class.

11 years agoBrowse command does not parse URL correctly
Bei Zhang [Sun, 24 Feb 2013 06:51:21 +0000 (22:51 -0800)]
Browse command does not parse URL correctly

11 years agoMerge pull request #506 from syntheticpp/string-find
Evan Martin [Thu, 21 Feb 2013 20:32:06 +0000 (12:32 -0800)]
Merge pull request #506 from syntheticpp/string-find

Fix wrong usage of std::string::find

11 years agoFix wrong usage of std::string::find
Peter Kümmel [Thu, 21 Feb 2013 18:42:12 +0000 (19:42 +0100)]
Fix wrong usage of std::string::find

11 years agoAdd a check for the VC++ 2012-style 64-bit path.
Ben Vanik [Wed, 20 Feb 2013 06:28:26 +0000 (22:28 -0800)]
Add a check for the VC++ 2012-style 64-bit path.
In VS2012 the path to the 64-bit tools has changed to
VCINSTALLDIR\bin\x86_amd64\cl.exe. This change will make the bootstrap
check there to see if it exists before falling back to the old amd64 path.

11 years agoFix typo, s/verison/version/
Martin Olsson [Tue, 19 Feb 2013 20:41:03 +0000 (21:41 +0100)]
Fix typo, s/verison/version/

11 years agoRemoved unused UnitsWaiting() function from State class.
Thiago Farina [Tue, 19 Feb 2013 20:31:10 +0000 (17:31 -0300)]
Removed unused UnitsWaiting() function from State class.

This function was added at 307f0bbd("and some basic implementation"), but nobody
calls it anymore.

Signed-off-by: Thiago Farina <tfarina@chromium.org>
11 years agomanual: move in_newline to the reference
Evan Martin [Tue, 19 Feb 2013 17:31:16 +0000 (09:31 -0800)]
manual: move in_newline to the reference

It's a detail, it doesn't belong in the brief tutorial overview.

11 years agoadd versioning notes to features in the manual
Evan Martin [Sun, 17 Feb 2013 19:22:37 +0000 (11:22 -0800)]
add versioning notes to features in the manual

This helps guide which ninja version to depend on.

11 years agomake doc xrefs link to section headers
Evan Martin [Sun, 17 Feb 2013 19:16:23 +0000 (11:16 -0800)]
make doc xrefs link to section headers

11 years agoFix typo in manual
Haitao Li 李海涛 [Sun, 17 Feb 2013 10:50:16 +0000 (18:50 +0800)]
Fix typo in manual

11 years agorearrange env variable section layout
Evan Martin [Sun, 17 Feb 2013 01:32:42 +0000 (17:32 -0800)]
rearrange env variable section layout

11 years agomove from asciidoc html to asciidoc -> docbook -> html
Evan Martin [Sun, 17 Feb 2013 01:13:10 +0000 (17:13 -0800)]
move from asciidoc html to asciidoc -> docbook -> html

As best as I can tell this is the easiest way to customize
the asciidoc HTML output.

11 years agosay where the default value for -j comes from
Evan Martin [Sat, 16 Feb 2013 23:16:50 +0000 (15:16 -0800)]
say where the default value for -j comes from

This is a FAQ.