platform/upstream/ninja.git
11 years ago.gitignore Eclipse project files
Richard Geary [Fri, 14 Sep 2012 09:04:19 +0000 (05:04 -0400)]
.gitignore Eclipse project files

Change-Id: I7cfe7cee92e1800284829f099fe6a44f212b527f

12 years agomark msvc-helper as experimental
Evan Martin [Thu, 13 Sep 2012 22:31:02 +0000 (15:31 -0700)]
mark msvc-helper as experimental

12 years agowindows: merge msvc-helper into ninja.exe itself
Evan Martin [Thu, 13 Sep 2012 18:07:45 +0000 (11:07 -0700)]
windows: merge msvc-helper into ninja.exe itself

Now "ninja -t msvc ..." passes the "..." to the msvc helper main.
This drastically simplifies bootstrap and makes ninja a single
binary again.

12 years agoMerge pull request #414 from riannucci/master
Evan Martin [Tue, 11 Sep 2012 04:23:08 +0000 (21:23 -0700)]
Merge pull request #414 from riannucci/master

Fix re2c detection in bootstrap which breaks win32 w/ gnuwin32

12 years agoFix re2c detection which breaks win32 w/ gnuwin32
Robert A. Iannucci Jr [Tue, 11 Sep 2012 03:42:32 +0000 (20:42 -0700)]
Fix re2c detection which breaks win32 w/ gnuwin32

12 years agoscoping workaround for gcc on Windows
Evan Martin [Fri, 7 Sep 2012 20:26:52 +0000 (13:26 -0700)]
scoping workaround for gcc on Windows

From https://github.com/martine/ninja/issues/410.

12 years agoinclude termios for solaris
Alex Caudill [Fri, 7 Sep 2012 20:24:26 +0000 (13:24 -0700)]
include termios for solaris

12 years agoadd solaris platform definitions
Alex Caudill [Fri, 7 Sep 2012 19:56:57 +0000 (19:56 +0000)]
add solaris platform definitions

12 years agodisable a new warning that popped up on Windows
Evan Martin [Fri, 7 Sep 2012 20:10:48 +0000 (13:10 -0700)]
disable a new warning that popped up on Windows

This pattern is safe as long as you're careful; we don't use it
very much.

12 years agoadd GetProcessorCount() implementation for Solaris
Alex Caudill [Fri, 7 Sep 2012 19:46:17 +0000 (12:46 -0700)]
add GetProcessorCount() implementation for Solaris

12 years agodrop special case for msvc bucket count
Evan Martin [Fri, 7 Sep 2012 19:36:16 +0000 (12:36 -0700)]
drop special case for msvc bucket count

Calling bucket_count() works locally with MSVC.  I wonder if some
other change in the code fixed this.

12 years agoMerge pull request #408 from nico/fix
Evan Martin [Thu, 6 Sep 2012 18:20:23 +0000 (11:20 -0700)]
Merge pull request #408 from nico/fix

Make sure no stale test file exists before running build log tests.

12 years agoallow tools to specify when they run (before/after build.ninja load)
Evan Martin [Thu, 6 Sep 2012 18:13:24 +0000 (11:13 -0700)]
allow tools to specify when they run (before/after build.ninja load)

This will be necessary to inline msvc-helper as well as so -t graph
can get depfiles.

12 years agofactor out metrics dump from ninja main
Evan Martin [Wed, 5 Sep 2012 16:19:26 +0000 (09:19 -0700)]
factor out metrics dump from ninja main

12 years agofactor out build log load from main
Evan Martin [Wed, 5 Sep 2012 16:14:39 +0000 (09:14 -0700)]
factor out build log load from main

12 years agorearrange tool-picking logic
Evan Martin [Wed, 5 Sep 2012 01:41:13 +0000 (21:41 -0400)]
rearrange tool-picking logic

Now "ninja -t list" works from any directory.

12 years agoshow all in graph
Evan Martin [Tue, 4 Sep 2012 23:03:35 +0000 (19:03 -0400)]
show all in graph

12 years agoreduce indent
Evan Martin [Tue, 4 Sep 2012 23:00:07 +0000 (19:00 -0400)]
reduce indent

12 years agomove BuildConfig out of globals
Evan Martin [Tue, 4 Sep 2012 22:57:16 +0000 (18:57 -0400)]
move BuildConfig out of globals

12 years agoremove DiskInterface from globals
Evan Martin [Tue, 4 Sep 2012 22:52:22 +0000 (18:52 -0400)]
remove DiskInterface from globals

12 years agoremove unfortunate header dependency
Evan Martin [Tue, 4 Sep 2012 22:48:49 +0000 (18:48 -0400)]
remove unfortunate header dependency

This was temporarily added, and now it can be removed.

12 years agoclarify setter
Evan Martin [Tue, 4 Sep 2012 22:43:45 +0000 (18:43 -0400)]
clarify setter

12 years agomove BuildLog to DependencyScan
Evan Martin [Tue, 4 Sep 2012 22:39:04 +0000 (18:39 -0400)]
move BuildLog to DependencyScan

The build log is needed in computing whether an edge is
dirty, so I think it belongs here.  (It's a bit weird
that Builder needs to reach into it to record completed
commands, maybe it will become cleaner with more thought.)

12 years agofix --debug for glibc pedantic mode
Evan Martin [Tue, 4 Sep 2012 22:21:52 +0000 (18:21 -0400)]
fix --debug for glibc pedantic mode

12 years agopass Builder as arg to build-running functions
Evan Martin [Tue, 4 Sep 2012 22:08:41 +0000 (18:08 -0400)]
pass Builder as arg to build-running functions

Reducing use of globals.

12 years agoremove config from BuildLog, rename members
Evan Martin [Sun, 2 Sep 2012 19:53:59 +0000 (15:53 -0400)]
remove config from BuildLog, rename members

12 years agoremove a redundant arg to RecomputeOutputDirty
Evan Martin [Sun, 2 Sep 2012 19:27:46 +0000 (12:27 -0700)]
remove a redundant arg to RecomputeOutputDirty

12 years agosplit out dirty recomputation logic from Edge class
Evan Martin [Sun, 2 Sep 2012 18:03:01 +0000 (11:03 -0700)]
split out dirty recomputation logic from Edge class

Rather than passing States and DiskInterfaces through all the calls,
put the necessary ambient information in a new DependencyScan object
and move the code accordingly.

Note: I didn't move the source location of the functions to preserve
history, though this does result in a sort of weird order for the
functions in graph.cc.

12 years agoMake sure no stale test file exists before running build log tests.
Nico Weber [Sat, 1 Sep 2012 05:56:11 +0000 (22:56 -0700)]
Make sure no stale test file exists before running build log tests.

12 years agoMerge pull request #407 from maximuska/proposed/dirty-on-missing-depfile
Evan Martin [Thu, 30 Aug 2012 18:26:55 +0000 (11:26 -0700)]
Merge pull request #407 from maximuska/proposed/dirty-on-missing-depfile

safer build: consider target dirty if depfile is missing

12 years agosafer build: consider target dirty if depfile is missing
Maxim Kalaev [Wed, 29 Aug 2012 20:25:44 +0000 (22:25 +0200)]
safer build: consider target dirty if depfile is missing

12 years agoMerge pull request #403 from nico/everylineweighsyoudown
Evan Martin [Tue, 28 Aug 2012 21:53:22 +0000 (14:53 -0700)]
Merge pull request #403 from nico/everylineweighsyoudown

Remove unused macro NINJA_UNUSED_ARG.

12 years agoRemove unused macro NINJA_UNUSED_ARG.
Nico Weber [Tue, 28 Aug 2012 19:11:27 +0000 (12:11 -0700)]
Remove unused macro NINJA_UNUSED_ARG.

12 years agopoint to HACKING.md in README
Evan Martin [Fri, 24 Aug 2012 19:27:48 +0000 (12:27 -0700)]
point to HACKING.md in README

12 years agodrop DepfileParserTest.Tilde, as it's covered by .SpecialChars
Evan Martin [Fri, 24 Aug 2012 19:01:00 +0000 (12:01 -0700)]
drop DepfileParserTest.Tilde, as it's covered by .SpecialChars

The SpecialChars test covers a bunch of different special characters,
including tilde.

12 years agolink directly to gtest zip
Evan Martin [Fri, 24 Aug 2012 18:53:48 +0000 (11:53 -0700)]
link directly to gtest zip

12 years agoupdate old test to cover newer rule attributes
Evan Martin [Fri, 24 Aug 2012 18:30:13 +0000 (11:30 -0700)]
update old test to cover newer rule attributes

12 years agoadd test that checks attributes on rules
Evan Martin [Fri, 6 Jan 2012 21:50:29 +0000 (13:50 -0800)]
add test that checks attributes on rules

12 years agowindows: pass /Zi to gtest compile as well
Evan Martin [Fri, 24 Aug 2012 18:20:55 +0000 (11:20 -0700)]
windows: pass /Zi to gtest compile as well

12 years agoremove crlfs from .gitignore
Evan Martin [Fri, 24 Aug 2012 18:14:52 +0000 (11:14 -0700)]
remove crlfs from .gitignore

These were introduced by a change of mine on Windows, whoops.

12 years agofix test broken in 697350d
Evan Martin [Fri, 17 Aug 2012 17:41:39 +0000 (10:41 -0700)]
fix test broken in 697350d

That's what I get for making last-second adjustments before checking in!

12 years agomake it more explicit that a bad build log causes us to rebuild
Evan Martin [Fri, 17 Aug 2012 17:25:21 +0000 (10:25 -0700)]
make it more explicit that a bad build log causes us to rebuild

(Committing this on top of b56fe80 since they're related,
but I may end up reverting both.)

12 years agoMerge pull request #401 from syntheticpp/win-network-path
Evan Martin [Fri, 17 Aug 2012 07:26:01 +0000 (00:26 -0700)]
Merge pull request #401 from syntheticpp/win-network-path

on windows a network path starts with two backslashes

12 years agoon windows a network path starts with two backslashes
Peter Kuemmel [Thu, 16 Aug 2012 13:26:33 +0000 (15:26 +0200)]
on windows a network path starts with two backslashes

12 years agodrop HACKING from doxygen
Evan Martin [Thu, 16 Aug 2012 18:31:37 +0000 (11:31 -0700)]
drop HACKING from doxygen

I tried just fixing the code to pull in HACKING.md but it didn't show
up in the doxygen output; it's maybe too long to include anyway.

12 years agouse 4 space tabs in configure.py, warn on re2c missing
Evan Martin [Thu, 16 Aug 2012 18:28:03 +0000 (11:28 -0700)]
use 4 space tabs in configure.py, warn on re2c missing

12 years agomany updates for HACKING.md
Evan Martin [Thu, 16 Aug 2012 18:25:55 +0000 (11:25 -0700)]
many updates for HACKING.md

In particular, describe a policy for good patches.

12 years agoMerge pull request #400 from nico/dynre2c
Evan Martin [Thu, 16 Aug 2012 05:26:46 +0000 (22:26 -0700)]
Merge pull request #400 from nico/dynre2c

Only write re2c rules if a re2c binary is found in the PATH.

12 years agoOnly write re2c rules if a re2c binary is found in the PATH.
Nico Weber [Thu, 16 Aug 2012 03:11:27 +0000 (20:11 -0700)]
Only write re2c rules if a re2c binary is found in the PATH.

12 years agoMerge pull request #399 from nico/hackless
Evan Martin [Thu, 16 Aug 2012 03:08:06 +0000 (20:08 -0700)]
Merge pull request #399 from nico/hackless

Remove -fcolor-diagnostics reference from HACKING

12 years agoRemove -fcolor-diagnostics reference from HACKING
Nico Weber [Thu, 16 Aug 2012 00:34:20 +0000 (17:34 -0700)]
Remove -fcolor-diagnostics reference from HACKING

configure.py adds that flag automatically if CXX is set to clang.

12 years agoconvert HACKING to markdown, add MSVC section
Evan Martin [Wed, 15 Aug 2012 21:46:57 +0000 (14:46 -0700)]
convert HACKING to markdown, add MSVC section

12 years agoif a file is missing in the log, count it as dirty
Scott Graham [Wed, 15 Aug 2012 04:09:19 +0000 (21:09 -0700)]
if a file is missing in the log, count it as dirty

This could cause overbuilding (if the log is missing an entry and
the right file is already in place) but is otherwise necessary
for correctness (if a file is already in place but we don't have
a log entry for it).

12 years agoadd a helper binary for wrapping cl.exe
Evan Martin [Wed, 15 Aug 2012 03:59:21 +0000 (20:59 -0700)]
add a helper binary for wrapping cl.exe

Modify bootstrap etc. to make use of this binary.

12 years agopass env block to cl helper
Evan Martin [Wed, 15 Aug 2012 03:54:59 +0000 (20:54 -0700)]
pass env block to cl helper

12 years agoMerge branch 'master' of github.com:martine/ninja
Evan Martin [Mon, 13 Aug 2012 23:38:41 +0000 (16:38 -0700)]
Merge branch 'master' of github.com:martine/ninja

12 years agorename -V to --version and clean up --help output
Evan Martin [Mon, 13 Aug 2012 18:39:32 +0000 (11:39 -0700)]
rename -V to --version and clean up --help output

12 years agocreate phony rules for all binaries
Evan Martin [Mon, 13 Aug 2012 01:43:42 +0000 (18:43 -0700)]
create phony rules for all binaries

12 years agomsvc helper: drop system includes
Evan Martin [Sun, 12 Aug 2012 23:29:43 +0000 (16:29 -0700)]
msvc helper: drop system includes

Drop any #includes that look like they're referencing system headers.
This reduces the dependency information considerably.

12 years agoincludes_normalize: also lowercase cross-drive includes
Evan Martin [Sun, 12 Aug 2012 23:27:58 +0000 (16:27 -0700)]
includes_normalize: also lowercase cross-drive includes

It seems to me inconsistent to normalize one but not the other.

12 years agoadd functions for normalizing win32 include paths
Scott Graham [Sun, 12 Aug 2012 22:51:21 +0000 (15:51 -0700)]
add functions for normalizing win32 include paths

(Note from Evan: this is landing Scott's code more or less verbatim
without a lot of analysis; it could maybe be simplified and reduced,
but it's only intended to be used in the MSVC helper so it's fine
to be experimental.)

12 years agoadd .ilk (incremental linker) to .gitignore
Evan Martin [Sun, 12 Aug 2012 22:23:31 +0000 (15:23 -0700)]
add .ilk (incremental linker) to .gitignore

12 years agomsvc helper: attempt to filter out when it prints the input filename
Evan Martin [Sun, 12 Aug 2012 22:09:33 +0000 (15:09 -0700)]
msvc helper: attempt to filter out when it prints the input filename

This is a heuristic but it appears to work for the Chrome build.

12 years agoadd subprocess-spawning to msvc_helper
Evan Martin [Sun, 12 Aug 2012 21:52:18 +0000 (14:52 -0700)]
add subprocess-spawning to msvc_helper

Rather than using subprocess.h, reimplement the subprocess code.
This allows:
1) using anonymous (instead of named) pipes
2) not using all the completion port craziness
3) printing the output as it happens
4) further variation, like adjusting the environment (in a forthcoming
   change) without affecting the main subprocess code

12 years agodoc some cl.exe flags in the configure script
Evan Martin [Sun, 12 Aug 2012 21:07:38 +0000 (14:07 -0700)]
doc some cl.exe flags in the configure script

12 years agomove Win32Fatal into util
Evan Martin [Sun, 12 Aug 2012 20:57:35 +0000 (13:57 -0700)]
move Win32Fatal into util

12 years agoadd a module for working with MSVC (cl.exe) behavior
Evan Martin [Sun, 12 Aug 2012 19:12:01 +0000 (12:12 -0700)]
add a module for working with MSVC (cl.exe) behavior

This will be needed for performant builds on Windows.

12 years agouse correct path separator for --with-gtest source
Evan Martin [Sun, 12 Aug 2012 19:01:38 +0000 (12:01 -0700)]
use correct path separator for --with-gtest source

12 years agodoc that ReadFile reads in text mode on Windows
Evan Martin [Sun, 12 Aug 2012 18:59:35 +0000 (11:59 -0700)]
doc that ReadFile reads in text mode on Windows

12 years agofix syntax errors in bootstrap.py
Matthew Woehlke [Fri, 10 Aug 2012 21:22:34 +0000 (17:22 -0400)]
fix syntax errors in bootstrap.py

12 years agowindows: fix integer truncation issues for helper binaries
Evan Martin [Fri, 10 Aug 2012 20:39:25 +0000 (13:39 -0700)]
windows: fix integer truncation issues for helper binaries

Disable the size_t truncation warning.  (Note that this leaves on
the other truncation-related warnings, like int->char.)

12 years agowindows: fix size_t<->int conversions in ninja.exe
Evan Martin [Fri, 10 Aug 2012 20:27:08 +0000 (13:27 -0700)]
windows: fix size_t<->int conversions in ninja.exe

12 years agorefactor
Evan Martin [Fri, 10 Aug 2012 19:45:39 +0000 (12:45 -0700)]
refactor

12 years agoadd bootstrap option to force 64-bit
Matthew Woehlke [Fri, 3 Aug 2012 22:42:44 +0000 (18:42 -0400)]
add bootstrap option to force 64-bit

12 years agowindows: ignore pdb files
Evan Martin [Fri, 10 Aug 2012 18:39:35 +0000 (11:39 -0700)]
windows: ignore pdb files

12 years agowindows bootstrap: clean up object files
Evan Martin [Wed, 1 Aug 2012 22:30:41 +0000 (15:30 -0700)]
windows bootstrap: clean up object files

12 years agodocument that \r and \t are disallowed
Evan Martin [Fri, 10 Aug 2012 17:58:36 +0000 (10:58 -0700)]
document that \r and \t are disallowed

Finishes #394.

12 years agofix windows build
Evan Martin [Wed, 8 Aug 2012 16:32:50 +0000 (09:32 -0700)]
fix windows build

12 years agouse DiskInterface to create the build directory
Evan Martin [Tue, 7 Aug 2012 20:58:55 +0000 (13:58 -0700)]
use DiskInterface to create the build directory

Fixes issue #392 (didn't handle creating nested build dirs right).

Moves MakeDir out of util.h; all code should go through
DiskInterface to simplify testing.  Moves ownership of the
DiskInterface into the client of the Builder, which also allows
removing some code that reached inside the object as well as
a minor leak.

12 years agoMerge pull request #397 from nico/mac105
Evan Martin [Sun, 5 Aug 2012 23:30:49 +0000 (16:30 -0700)]
Merge pull request #397 from nico/mac105

Include unistd.h in files that use unlink() on OS X.

12 years agoInclude unistd.h in files that use unlink() on OS X.
Nico Weber [Sun, 5 Aug 2012 19:02:01 +0000 (12:02 -0700)]
Include unistd.h in files that use unlink() on OS X.

`man unlink` says this is necessary, and according to a report by
Claus Klein, omitting them breaks the build on OS X 10.5 with gcc 4.7
(see issue #396).

(On Windows, ninja's util.h includes a define for unlink.)

12 years agoreject tabs (and CRs) in input files more aggressively
Evan Martin [Thu, 2 Aug 2012 22:24:32 +0000 (15:24 -0700)]
reject tabs (and CRs) in input files more aggressively

12 years agoMerge branch 'master' of github.com:martine/ninja
Evan Martin [Wed, 1 Aug 2012 23:13:31 +0000 (16:13 -0700)]
Merge branch 'master' of github.com:martine/ninja

12 years agoMerge branch 'factor-elide-middle' of git://github.com/polrop/ninja
Evan Martin [Wed, 1 Aug 2012 23:12:55 +0000 (16:12 -0700)]
Merge branch 'factor-elide-middle' of git://github.com/polrop/ninja

Conflicts:
src/util.cc

12 years agoMerge pull request #388 from sgraham/fix-hash-map-string-piece
Evan Martin [Wed, 1 Aug 2012 15:49:35 +0000 (08:49 -0700)]
Merge pull request #388 from sgraham/fix-hash-map-string-piece

fix hash_map StringPiece comparator

12 years agofix hash_map StringPiece comparator
Scott Graham [Tue, 31 Jul 2012 17:05:34 +0000 (10:05 -0700)]
fix hash_map StringPiece comparator

12 years agoRe-factor elide code and test it.
Nicolas Despres [Sat, 28 Jul 2012 12:41:20 +0000 (14:41 +0200)]
Re-factor elide code and test it.

12 years agouse chdir() define from util.h
Evan Martin [Sat, 28 Jul 2012 20:35:13 +0000 (13:35 -0700)]
use chdir() define from util.h

12 years agomove processor-count code to util.cc
Evan Martin [Sat, 28 Jul 2012 20:32:23 +0000 (13:32 -0700)]
move processor-count code to util.cc

12 years agonote that -l doesn't work on windows
Evan Martin [Sat, 28 Jul 2012 20:28:56 +0000 (13:28 -0700)]
note that -l doesn't work on windows

Filed issue #386 about it too.

12 years agosimplify load-average code
Evan Martin [Sat, 28 Jul 2012 20:27:27 +0000 (13:27 -0700)]
simplify load-average code

12 years agodelete vestigal declarations
Evan Martin [Sat, 28 Jul 2012 20:21:39 +0000 (13:21 -0700)]
delete vestigal declarations

12 years agoMerge pull request #385 from nico/nolotsonosx
Evan Martin [Sat, 28 Jul 2012 18:51:17 +0000 (11:51 -0700)]
Merge pull request #385 from nico/nolotsonosx

Disable SubprocessTest.TestWithLots on OS X.

12 years agoDisable SubprocessTest.TestWithLots on OS X.
Nico Weber [Sat, 28 Jul 2012 18:17:08 +0000 (11:17 -0700)]
Disable SubprocessTest.TestWithLots on OS X.

It fails on OS X, see issue #384.

12 years agoMerge pull request #383 from nico/fix380
Evan Martin [Sat, 28 Jul 2012 18:04:57 +0000 (11:04 -0700)]
Merge pull request #383 from nico/fix380

Fix issue #380.

12 years agoRevert "Make StringPiece data members private."
Nico Weber [Sat, 28 Jul 2012 16:56:59 +0000 (09:56 -0700)]
Revert "Make StringPiece data members private."

This reverts commit 904c9610fe66c4f4bd63a07d6f057c8603d24394.
The commit caused issue #380, this revert fixes it. The revert
also makes the test from the previous commit pass.

12 years agoAdd a regression test for issue #380 (which fails at the moment)
Nico Weber [Sat, 28 Jul 2012 16:56:55 +0000 (09:56 -0700)]
Add a regression test for issue #380 (which fails at the moment)

12 years agoMerge pull request #378 from syntheticpp/msvc-fixes
Evan Martin [Fri, 27 Jul 2012 22:49:30 +0000 (15:49 -0700)]
Merge pull request #378 from syntheticpp/msvc-fixes

also build with msvc

12 years agoalso build with msvc
Peter Kümmel [Fri, 27 Jul 2012 21:09:52 +0000 (23:09 +0200)]
also build with msvc

12 years agofix a warning and leak in windows-specific console output code
Evan Martin [Fri, 27 Jul 2012 20:46:46 +0000 (13:46 -0700)]
fix a warning and leak in windows-specific console output code