platform/upstream/ninja.git
9 years agoassert no slashes in default GetNode
Scott Graham [Sun, 9 Nov 2014 07:10:34 +0000 (23:10 -0800)]
assert no slashes in default GetNode

9 years agofix order of args to CanonicalizePath
Scott Graham [Sun, 9 Nov 2014 07:01:23 +0000 (23:01 -0800)]
fix order of args to CanonicalizePath

9 years agoremove CanonicalizePath overloads, test for toplevel behaviour
Scott Graham [Sun, 9 Nov 2014 06:49:21 +0000 (22:49 -0800)]
remove CanonicalizePath overloads, test for toplevel behaviour

9 years agopath decanonicalization when building command
Scott Graham [Sat, 8 Nov 2014 19:47:22 +0000 (11:47 -0800)]
path decanonicalization when building command

9 years agofix multiple sequential slashes
Scott Graham [Sat, 8 Nov 2014 19:25:03 +0000 (11:25 -0800)]
fix multiple sequential slashes

9 years agowip on adding tests at higher level, some not right
Scott Graham [Sat, 8 Nov 2014 06:38:59 +0000 (22:38 -0800)]
wip on adding tests at higher level, some not right

9 years agotrack back->forward conversions in a bitmask
Scott Graham [Sat, 8 Nov 2014 06:20:34 +0000 (22:20 -0800)]
track back->forward conversions in a bitmask

9 years agoMerge pull request #822 from tzik/throttle
Nico Weber [Mon, 3 Nov 2014 22:35:55 +0000 (14:35 -0800)]
Merge pull request #822 from tzik/throttle

Throttle the number of pending commands by the parallelism configuration

9 years agoMerge pull request #825 from Rapptz/master
Nico Weber [Sat, 1 Nov 2014 19:26:19 +0000 (12:26 -0700)]
Merge pull request #825 from Rapptz/master

Suppress warnings from building with MinGW

9 years agoMerge pull request #841 from sgraham/strchr
Nico Weber [Fri, 31 Oct 2014 01:58:28 +0000 (18:58 -0700)]
Merge pull request #841 from sgraham/strchr

Use strchr in \ conversion in CanonicalizePath on Windows

9 years agoUse strchr in \ conversion in CanonicalizePath on Windows
Scott Graham [Thu, 30 Oct 2014 23:52:55 +0000 (16:52 -0700)]
Use strchr in \ conversion in CanonicalizePath on Windows

9 years agoMerge pull request #840 from sgraham/canon-win-squashed
Nico Weber [Thu, 30 Oct 2014 23:35:33 +0000 (16:35 -0700)]
Merge pull request #840 from sgraham/canon-win-squashed

CanonicalizePath handles \ on Windows

9 years agoCanonicalizePath handles \ on Windows
Scott Graham [Thu, 30 Oct 2014 22:34:25 +0000 (15:34 -0700)]
CanonicalizePath handles \ on Windows

9 years agoMerge pull request #837 from ppbrown/master
Nico Weber [Mon, 27 Oct 2014 21:00:23 +0000 (14:00 -0700)]
Merge pull request #837 from ppbrown/master

Update line_printer.cc with termios.h

9 years agoUpdate line_printer.cc
ppbrown [Mon, 27 Oct 2014 20:36:37 +0000 (13:36 -0700)]
Update line_printer.cc

Include POSIX termios.h

9 years agoMerge pull request #834 from frasercrmck/master
Nico Weber [Sun, 26 Oct 2014 20:39:49 +0000 (13:39 -0700)]
Merge pull request #834 from frasercrmck/master

Add zsh completion for targets in conjunction with -C

9 years agoAdd zsh completion for targets in conjunction with -C
Fraser Cormack [Fri, 24 Oct 2014 19:34:06 +0000 (20:34 +0100)]
Add zsh completion for targets in conjunction with -C

zsh can now list completions for targets in the directory specified by
the -C option

9 years agoFix unknown pragma warnings
Danny [Sun, 28 Sep 2014 09:52:08 +0000 (05:52 -0400)]
Fix unknown pragma warnings

9 years agoThrottle the number of pending commands by the parallelism configuration
tzik [Fri, 19 Sep 2014 08:07:29 +0000 (17:07 +0900)]
Throttle the number of pending commands by the parallelism configuration

9 years agoMerge pull request #823 from nico/conf
Nico Weber [Fri, 19 Sep 2014 16:30:00 +0000 (09:30 -0700)]
Merge pull request #823 from nico/conf

Make auto-reconfiguring work if CFLAGS contains more than one flag.

9 years agoMake auto-reconfiguring work if CFLAGS contains more than one flag.
Nico Weber [Fri, 19 Sep 2014 15:49:00 +0000 (08:49 -0700)]
Make auto-reconfiguring work if CFLAGS contains more than one flag.

When using an open-source clang on OS X, one has to pass an isysroot
flag so that it can find system headers (stdio.h), like so:

  CXX=path/to/clang++ CFLAGS="-isysroot $(xcrun -show-sdk-path)" ./configure.py

Previously, configure.py wouldn't quote envvars containing spaces, so
it'd rerun this as

  CXX=path/to/clang++ CFLAGS=-isysroot /sysroot/path ./configure.py

which would then die because /sysroot/path wasn't excecutable.

9 years agoMerge pull request #820 from nico/ohceedee
Nico Weber [Fri, 19 Sep 2014 04:30:19 +0000 (21:30 -0700)]
Merge pull request #820 from nico/ohceedee

Don't print "Recompacting..." message from tests.

9 years agoDon't print "Recompacting..." message from tests.
Nico Weber [Fri, 19 Sep 2014 04:25:32 +0000 (21:25 -0700)]
Don't print "Recompacting..." message from tests.

Now tests don't print anything. Non-test behavior is unchanged.

9 years agoMerge pull request #819 from nico/win
Nico Weber [Thu, 18 Sep 2014 23:12:45 +0000 (16:12 -0700)]
Merge pull request #819 from nico/win

Fix building tests on Windows again.

9 years agoFix building tests on Windows again.
Nico Weber [Thu, 18 Sep 2014 23:08:25 +0000 (16:08 -0700)]
Fix building tests on Windows again.

Turns out gtest was pulling in sys/stat.h, and we were
using stat() through that in tests. This doesn't work
with old MSVCs, so we should probably replace that with
RealDiskInterface in a follow-up.

9 years agoMerge pull request #818 from nico/lesstest
Nico Weber [Thu, 18 Sep 2014 16:27:48 +0000 (09:27 -0700)]
Merge pull request #818 from nico/lesstest

remove more things not needed without gtest

9 years agoremove more things not needed without gtest
Nico Weber [Thu, 18 Sep 2014 16:14:20 +0000 (09:14 -0700)]
remove more things not needed without gtest

9 years agoMerge pull request #817 from nico/warn
Nico Weber [Thu, 18 Sep 2014 15:18:40 +0000 (08:18 -0700)]
Merge pull request #817 from nico/warn

fix warning

9 years agofix warning
Nico Weber [Thu, 18 Sep 2014 15:15:31 +0000 (08:15 -0700)]
fix warning

9 years agoMerge pull request #815 from sgraham/gtest-tidy
Nico Weber [Thu, 18 Sep 2014 15:10:57 +0000 (08:10 -0700)]
Merge pull request #815 from sgraham/gtest-tidy

Don't need to install and configure with gtest any more

9 years agoDon't need to install and configure with gtest any more
Scott Graham [Thu, 18 Sep 2014 05:18:08 +0000 (22:18 -0700)]
Don't need to install and configure with gtest any more

9 years agoMerge pull request #812 from nico/ninjatest
Nico Weber [Thu, 18 Sep 2014 05:00:33 +0000 (22:00 -0700)]
Merge pull request #812 from nico/ninjatest

Use a small, standalone testing framework for ninja instead of googletest.

9 years agoDon't support ? and : for --gtest-filter, a bit simpler.
Nico Weber [Thu, 18 Sep 2014 04:22:49 +0000 (21:22 -0700)]
Don't support ? and : for --gtest-filter, a bit simpler.

Let me know if you use these!

9 years agoAdd support for --gtest_filter. The bots need it, and it is a useful flag.
Nico Weber [Thu, 18 Sep 2014 03:35:07 +0000 (20:35 -0700)]
Add support for --gtest_filter. The bots need it, and it is a useful flag.

9 years agoUse a small, standalone testing framework instead of googletest.
Nico Weber [Thu, 18 Sep 2014 02:48:26 +0000 (19:48 -0700)]
Use a small, standalone testing framework instead of googletest.

Ninja currently uses googletest for testing. That makes building
ninja_test somewhat annoying since it requires that one passes
--with-gtest PATH to configure. It turns out just implementing the bits
of googletest that ninja uses needs about the same amount of code than
making the --with-gtest flag in configure.py work and making googletest
print test results in a way we want (!)

In addition to making configuration simpler, this also makes compiling
tests much faster: On my system, touching src/build_test.cc (the slowest
file to build in ninja) and rebuilding ninja_tests is twice as fast than
without this patch. Building all is noticeably faster too: 5.6s with
this patch, 9.1s without this patch (38% faster).

The most noticeable things missing: EXPECT_* and ASSERT_* don't support
streaming notes to them with operator<<, and for failing tests the lhs
and rhs are not printed. That's so that this header does not have to
include sstream, which slows down building ninja_test almost 20%.
If this turns out to be annoying, we can maybe add it.

9 years agoMerge pull request #808 from nico/bettererror
Nico Weber [Thu, 4 Sep 2014 02:33:47 +0000 (19:33 -0700)]
Merge pull request #808 from nico/bettererror

Provide an error message on malformed lets. Fixes #807.

9 years agoProvide an error message on malformed lets. Fixes #807.
Nico Weber [Thu, 4 Sep 2014 02:31:29 +0000 (19:31 -0700)]
Provide an error message on malformed lets. Fixes #807.

9 years agoMerge pull request #803 from martine/arch
Nico Weber [Tue, 5 Aug 2014 22:24:37 +0000 (15:24 -0700)]
Merge pull request #803 from martine/arch

amend HACKING.md with instructions for Arch Linux

9 years agoMerge pull request #802 from martine/parens
Nico Weber [Tue, 5 Aug 2014 22:24:04 +0000 (15:24 -0700)]
Merge pull request #802 from martine/parens

add some parens to silence a gcc warning

9 years agoamend HACKING.md with instructions for Arch Linux
Evan Martin [Mon, 4 Aug 2014 15:35:56 +0000 (08:35 -0700)]
amend HACKING.md with instructions for Arch Linux

9 years agoadd some parens to silence a gcc warning
Evan Martin [Mon, 4 Aug 2014 15:21:34 +0000 (08:21 -0700)]
add some parens to silence a gcc warning

10 years agoMerge pull request #798 from kwesolowski/master
Nico Weber [Sun, 27 Jul 2014 20:16:41 +0000 (13:16 -0700)]
Merge pull request #798 from kwesolowski/master

Provided Basic Support for -l N option on windows platform.

10 years agoRemove extra info from Usage()
kwesolowski [Sat, 26 Jul 2014 23:17:34 +0000 (01:17 +0200)]
Remove extra info from Usage()

As now behavior is similar on on platforms, this can probably be removed

10 years agoChanged implementation to provide load from 0 to ProcessorCount
kwesolowski [Sat, 26 Jul 2014 10:38:26 +0000 (12:38 +0200)]
Changed implementation to provide load from 0 to ProcessorCount

This makes this implementation more consisten with POSIX load avarage.

10 years agoFixed naming convention in GetLoadAverage support functions.
kwesolowski [Sat, 26 Jul 2014 08:01:29 +0000 (10:01 +0200)]
Fixed naming convention in GetLoadAverage support functions.

10 years agoMerge pull request #799 from ryo-on/netbsd-support
Nico Weber [Sat, 26 Jul 2014 03:57:59 +0000 (20:57 -0700)]
Merge pull request #799 from ryo-on/netbsd-support

Add NetBSD support.

10 years agoImproved load calculation
kwesolowski [Fri, 25 Jul 2014 09:24:45 +0000 (11:24 +0200)]
Improved load calculation

Added code to gracefully handle:
1. Call to CalculateProcessorLoad with not incremented ticks (fast calls
to GetSystemTimes can result same results),
2. Smooth/filter load estimation for consecutive calls.

10 years agoSmall usage info fix for windows
kwesolowski [Fri, 25 Jul 2014 09:22:20 +0000 (11:22 +0200)]
Small usage info fix for windows

10 years agoFixes for windows CalculateProcessorLoad
kwesolowski [Fri, 25 Jul 2014 08:36:21 +0000 (10:36 +0200)]
Fixes for windows CalculateProcessorLoad

- Fixed bad logic condition,
- Added comment to clarify

10 years agoFixed/improved -l N documentation For windows
kwesolowski [Fri, 25 Jul 2014 07:42:33 +0000 (09:42 +0200)]
Fixed/improved -l N documentation For windows

On windows "system load" is not so obvious term, added line explaining N
argument in -l N

10 years agoPrepared load (-l N) support for windows.
kwesolowski [Thu, 24 Jul 2014 22:05:31 +0000 (00:05 +0200)]
Prepared load (-l N) support for windows.

Inspired by:
http://stackoverflow.com/questions/23143693/retrieving-cpu-load-percent-total-in-windows-with-c

10 years agoAdd NetBSD support.
Ryo ONODERA [Sat, 19 Jul 2014 09:45:25 +0000 (18:45 +0900)]
Add NetBSD support.
It works fine under NetBSD/amd64 6.99.47.

10 years agoMerge pull request #788 from donkopotamus/patch-2
Nico Weber [Mon, 30 Jun 2014 02:17:49 +0000 (19:17 -0700)]
Merge pull request #788 from donkopotamus/patch-2

Add highlighting of rule in build statements

10 years agoMerge pull request #755 from zmodem/working_dir_vs_msvc_tool
Nico Weber [Sun, 29 Jun 2014 21:17:37 +0000 (14:17 -0700)]
Merge pull request #755 from zmodem/working_dir_vs_msvc_tool

Process the -C option before running RUN_AFTER_FLAGS tools.

10 years agomark this 1.5.1.git
Nico Weber [Fri, 27 Jun 2014 23:36:18 +0000 (16:36 -0700)]
mark this 1.5.1.git

10 years agoMerge pull request #792 from nico/statdir
Nico Weber [Fri, 27 Jun 2014 23:32:31 +0000 (16:32 -0700)]
Merge pull request #792 from nico/statdir

try to fix stat()ing directories on windows in statcache code

10 years agotry to fix stat()ing directories on windows
Nico Weber [Fri, 27 Jun 2014 23:11:50 +0000 (16:11 -0700)]
try to fix stat()ing directories on windows

10 years agoadd more tests for stat()ing a directory
Nico Weber [Fri, 27 Jun 2014 22:58:32 +0000 (15:58 -0700)]
add more tests for stat()ing a directory

10 years agoadd a test for stat()ing a directory
Nico Weber [Fri, 27 Jun 2014 22:51:56 +0000 (15:51 -0700)]
add a test for stat()ing a directory

10 years agoMerge pull request #791 from nico/relmore
Nico Weber [Fri, 27 Jun 2014 21:11:58 +0000 (14:11 -0700)]
Merge pull request #791 from nico/relmore

also note that branch release needs to be pushed

10 years agoalso note that branch release needs to be pushed
Nico Weber [Fri, 27 Jun 2014 21:11:23 +0000 (14:11 -0700)]
also note that branch release needs to be pushed

10 years agoMerge pull request #790 from nico/relnotes2
Nico Weber [Fri, 27 Jun 2014 20:37:11 +0000 (13:37 -0700)]
Merge pull request #790 from nico/relnotes2

expand RELEASING a bit

10 years agoexpand RELEASING a bit
Nico Weber [Fri, 27 Jun 2014 20:29:16 +0000 (13:29 -0700)]
expand RELEASING a bit

10 years agomark this 1.5.0.git, update RELEASING
Nico Weber [Fri, 27 Jun 2014 20:15:57 +0000 (13:15 -0700)]
mark this 1.5.0.git, update RELEASING

10 years agoMerge pull request #789 from nico/dontwin
Nico Weber [Fri, 27 Jun 2014 20:07:54 +0000 (13:07 -0700)]
Merge pull request #789 from nico/dontwin

Rename -d nowinstatcache to -d nostatcache; might become useful elsewhere (#787)

10 years agoRename -d nowinstatcache to -d nostatcache; might become useful elsewhere (#787)
Nico Weber [Fri, 27 Jun 2014 20:03:41 +0000 (13:03 -0700)]
Rename -d nowinstatcache to -d nostatcache; might become useful elsewhere (#787)

10 years agoAdd highlighting of rule in build statements
donkopotamus [Fri, 27 Jun 2014 00:26:37 +0000 (12:26 +1200)]
Add highlighting of rule in build statements

Highlight the rule being used in a build statement.  Also add `.` to acceptable characters in a rule name and relax whitespace matching before the name.

10 years agoMerge pull request #786 from donkopotamus/patch-1
Nico Weber [Thu, 26 Jun 2014 05:12:01 +0000 (22:12 -0700)]
Merge pull request #786 from donkopotamus/patch-1

Update ninja-mode for emacs to handle hyphens in rule names

10 years agoUpdate ninja-mode for emacs to handle hyphens in rule names
donkopotamus [Thu, 26 Jun 2014 04:34:35 +0000 (16:34 +1200)]
Update ninja-mode for emacs to handle hyphens in rule names

10 years agoMerge pull request #785 from nico/unused
Nico Weber [Wed, 25 Jun 2014 00:57:28 +0000 (17:57 -0700)]
Merge pull request #785 from nico/unused

Fix -Wunused-result warning for chdir on linux.

10 years agoFix -Wunused-result warning for chdir on linux.
Nico Weber [Wed, 25 Jun 2014 00:49:22 +0000 (17:49 -0700)]
Fix -Wunused-result warning for chdir on linux.

10 years agoMerge pull request #784 from nico/statkeep
Nico Weber [Fri, 20 Jun 2014 14:30:10 +0000 (07:30 -0700)]
Merge pull request #784 from nico/statkeep

do not delete files from the logs that still exist on disk

10 years agodo not delete files from the logs that still exist on disk
Nico Weber [Thu, 19 Jun 2014 23:09:50 +0000 (16:09 -0700)]
do not delete files from the logs that still exist on disk

This is to keep the possibility of maybe having a tool that deletes
old files in the future, or for having a tool which exposes this
information to generators so they can do that.

See https://github.com/martine/ninja/pull/697#issuecomment-37140762
and the discussion on #762.

Idea from @maximuska!

10 years agomake Stat() a const method
Nico Weber [Thu, 19 Jun 2014 23:00:35 +0000 (16:00 -0700)]
make Stat() a const method

10 years agoMerge pull request #783 from sgraham/findexinfobasic
Nico Weber [Thu, 19 Jun 2014 19:21:33 +0000 (12:21 -0700)]
Merge pull request #783 from sgraham/findexinfobasic

use local definition of FindExInfoBasic for earlier sdks

10 years agouse local definition of FindExInfoBasic for earlier sdks
Scott Graham [Thu, 19 Jun 2014 18:22:44 +0000 (11:22 -0700)]
use local definition of FindExInfoBasic for earlier sdks

10 years agoMerge pull request #782 from sgraham/warning-on-81sdk
Nico Weber [Mon, 16 Jun 2014 18:11:00 +0000 (11:11 -0700)]
Merge pull request #782 from sgraham/warning-on-81sdk

suppress warning on win8.1 sdk

10 years agosuppress warning on win8.1 sdk
Scott Graham [Mon, 16 Jun 2014 17:56:24 +0000 (10:56 -0700)]
suppress warning on win8.1 sdk

10 years agoMerge pull request #781 from nico/cleaner
Nico Weber [Mon, 16 Jun 2014 17:33:23 +0000 (10:33 -0700)]
Merge pull request #781 from nico/cleaner

simplify statcache code more

10 years agosimplify statcache code more
Nico Weber [Mon, 16 Jun 2014 17:27:10 +0000 (10:27 -0700)]
simplify statcache code more

10 years agoMerge pull request #780 from nico/versioncheck
Nico Weber [Mon, 16 Jun 2014 17:10:04 +0000 (10:10 -0700)]
Merge pull request #780 from nico/versioncheck

only use FindExInfoBasic on win7+

10 years agoonly use FindExInfoBasic on win7+
Nico Weber [Mon, 16 Jun 2014 16:59:16 +0000 (09:59 -0700)]
only use FindExInfoBasic on win7+

10 years agoMerge pull request #779 from nico/statcache
Nico Weber [Sun, 15 Jun 2014 23:01:49 +0000 (16:01 -0700)]
Merge pull request #779 from nico/statcache

Use FindFirstFileEx() for stat()ing files on Windows.

10 years agos/hFind/find_handle/
Nico Weber [Sun, 15 Jun 2014 23:00:13 +0000 (16:00 -0700)]
s/hFind/find_handle/

10 years agoadd missing _WIN32 checks
Nico Weber [Sun, 15 Jun 2014 22:26:37 +0000 (15:26 -0700)]
add missing _WIN32 checks

10 years agomake bool exist everywhere, for simpler calling code
Nico Weber [Sun, 15 Jun 2014 22:16:50 +0000 (15:16 -0700)]
make bool exist everywhere, for simpler calling code

10 years agoadd some statcache tests
Nico Weber [Sun, 15 Jun 2014 21:42:42 +0000 (14:42 -0700)]
add some statcache tests

10 years agoFree cache memory once it's no longer used.
Nico Weber [Sun, 15 Jun 2014 21:11:27 +0000 (14:11 -0700)]
Free cache memory once it's no longer used.

Doesn't slow down empty build times measurably, and
saves some memory on non-empty builds.

10 years agoerror checking
Nico Weber [Sun, 15 Jun 2014 05:18:28 +0000 (22:18 -0700)]
error checking

10 years agoon by default
Nico Weber [Sun, 15 Jun 2014 05:11:31 +0000 (22:11 -0700)]
on by default

10 years agocomment
Nico Weber [Sun, 15 Jun 2014 05:07:04 +0000 (22:07 -0700)]
comment

10 years agomake win-only
Nico Weber [Sun, 15 Jun 2014 05:05:09 +0000 (22:05 -0700)]
make win-only

10 years agosimplify more, move behind flag
Nico Weber [Sun, 15 Jun 2014 04:50:05 +0000 (21:50 -0700)]
simplify more, move behind flag

10 years agomore minor cleanups
Nico Weber [Sun, 15 Jun 2014 04:38:44 +0000 (21:38 -0700)]
more minor cleanups

10 years agomore minor cleanups
Nico Weber [Sun, 15 Jun 2014 04:36:30 +0000 (21:36 -0700)]
more minor cleanups

10 years agominor cleanups
Nico Weber [Sun, 15 Jun 2014 04:29:18 +0000 (21:29 -0700)]
minor cleanups

10 years agoTurn on stat cache. Empty builds of chrome on my laptop 4s -> 1.3s (!)
Nico Weber [Sun, 25 May 2014 04:36:57 +0000 (21:36 -0700)]
Turn on stat cache. Empty builds of chrome on my laptop 4s -> 1.3s (!)

10 years agoAdd a stat cache. Demo-quality, and disabled atm.
Nico Weber [Sun, 25 May 2014 04:17:35 +0000 (21:17 -0700)]
Add a stat cache. Demo-quality, and disabled atm.

10 years agoMerge pull request #778 from nico/spellrsp
Nico Weber [Sun, 15 Jun 2014 05:50:54 +0000 (22:50 -0700)]
Merge pull request #778 from nico/spellrsp

spellcheck "keeprsp" in -d options

10 years agospellcheck "keeprsp" in -d options
Nico Weber [Sun, 15 Jun 2014 05:49:01 +0000 (22:49 -0700)]
spellcheck "keeprsp" in -d options