Maxim Kalaev [Wed, 27 Jun 2012 21:28:32 +0000 (23:28 +0200)]
Improving Edge::Dump, introducing Node::Dump
- Edge::Dump could crash if called while inputs_ is being extended
- Node::Dump prints Node attributes, in-edge and lists of out-edges
- Dump functions now accept "prefix" parameter, printed along with the object
for easier orientation. For example, edge->Dump("Re-reading deps files").
Evan Martin [Tue, 19 Jun 2012 17:31:14 +0000 (10:31 -0700)]
switch build log to print hashes as hex
Nico convinced me that it's safe to do this without revving the build
log format: the old decimal values will still parse as hex (just as
different numbers) and cause a superfluous rebuild.
Evan Martin [Tue, 19 Jun 2012 16:36:42 +0000 (09:36 -0700)]
add copyright header
Evan Martin [Tue, 19 Jun 2012 16:31:26 +0000 (09:31 -0700)]
add new binaries to gitignore
Evan Martin [Mon, 18 Jun 2012 22:47:38 +0000 (15:47 -0700)]
drop support of log formats < 4
Log format 4 was introduced in January.
There's been plenty of time to migrate.
Evan Martin [Mon, 18 Jun 2012 22:41:28 +0000 (15:41 -0700)]
use PRIu64 for printing 64-bit in, %d for printing int
Fixes a warning.
Evan Martin [Mon, 18 Jun 2012 22:29:23 +0000 (15:29 -0700)]
make canon_perftest build, add license
Evan Martin [Mon, 18 Jun 2012 18:51:24 +0000 (11:51 -0700)]
Merge pull request #338 from syntheticpp/empty-log-file
no recompacting needed when log file is empty
Peter Kuemmel [Mon, 18 Jun 2012 11:20:31 +0000 (13:20 +0200)]
no recompacting needed when log file is empty
Evan Martin [Sun, 17 Jun 2012 01:54:07 +0000 (18:54 -0700)]
Merge pull request #316 from tfarina/struct
No need to write 'struct' before type name when declaraing variables in ...
Evan Martin [Sat, 16 Jun 2012 20:29:09 +0000 (13:29 -0700)]
fix quoting thinko
Evan Martin [Sat, 16 Jun 2012 20:27:14 +0000 (13:27 -0700)]
rearrange shell quoting in configure.py
Evan Martin [Sat, 16 Jun 2012 17:01:45 +0000 (10:01 -0700)]
Merge pull request #333 from jonforums/no-main-multi-defs
Prevent multiple definition link error
Jon [Sat, 16 Jun 2012 15:52:58 +0000 (11:52 -0400)]
Prevent multiple definition link error
Globbed inclusion of `src/hash_collision_bench.cc` cause link errors
Evan Martin [Fri, 15 Jun 2012 22:05:57 +0000 (15:05 -0700)]
Merge pull request #331 from sgraham/add-in_newline
Add $in_newline
Evan Martin [Fri, 15 Jun 2012 22:04:25 +0000 (15:04 -0700)]
Merge pull request #330 from sgraham/win32-hash-build
fix windows build
Scott Graham [Fri, 15 Jun 2012 21:57:22 +0000 (14:57 -0700)]
improve test
Scott Graham [Fri, 15 Jun 2012 21:48:43 +0000 (14:48 -0700)]
add $in_newline
Scott Graham [Fri, 15 Jun 2012 21:28:23 +0000 (14:28 -0700)]
fix windows build
Evan Martin [Fri, 15 Jun 2012 20:45:37 +0000 (13:45 -0700)]
Merge pull request #329 from nico/hash2
Only store command hashes in the build log.
Nico Weber [Fri, 15 Jun 2012 16:50:06 +0000 (09:50 -0700)]
Add a hash collision benchmark.
Nico Weber [Fri, 15 Jun 2012 04:52:17 +0000 (21:52 -0700)]
Only store command hashes in the build log.
.build_log load time 350ms -> 17ms, filesize 197MB -> 1.6MB on
Mac. On Windows, it's 500ms -> 20ms.
Makes the build log a lot less useful for scripts, but there could
be a tool for use cases that need log information. A prototype of
such a tool is in https://github.com/nico/ninja/commit/
1b243d311
The hash function is 64bit murmurhash2. Assuming that that different
commands get the same hash only by chance, it's is very unlikely
for two different commands to hash to the same value with a 64bit
hash.
Evan Martin [Fri, 15 Jun 2012 19:40:05 +0000 (12:40 -0700)]
Merge pull request #328 from nico/canonperf
add canon_perftest
Evan Martin [Tue, 12 Jun 2012 22:11:22 +0000 (15:11 -0700)]
allow '(' and ')' in depfile paths
Fixes issue #327.
Evan Martin [Tue, 12 Jun 2012 21:54:34 +0000 (14:54 -0700)]
add a note to HACKING about how to get gtest
Evan Martin [Tue, 12 Jun 2012 21:49:40 +0000 (14:49 -0700)]
fix a typo in a test name
Evan Martin [Tue, 12 Jun 2012 03:03:56 +0000 (20:03 -0700)]
Merge pull request #325 from luvit/fix-path-magic
bootstrap: fix path magic on windows
Brandon Philips [Mon, 11 Jun 2012 17:19:23 +0000 (10:19 -0700)]
bootstrap: fix path magic on windows
It was reported that argv[0] doesn't get set on windows. Some research
showed that using abspath(__filename__) should accomplish this.
Evan Martin [Sun, 10 Jun 2012 07:45:59 +0000 (00:45 -0700)]
Merge pull request #323 from luvit/bootstrap-from-cwd
bootstrap: chdir to bootstrap's directory
Brandon Philips [Sun, 10 Jun 2012 01:38:50 +0000 (18:38 -0700)]
bootstrap: chdir to bootstrap's directory
When integrating ninja into luvit I naively tried calling:
./tools/ninja/bootstrap.py
This broke because bootstrap expects you to be in the ninja directory
when you call it. This patch makes it possible to run bootstrap.py like
above and have it work.
Evan Martin [Thu, 7 Jun 2012 23:03:01 +0000 (16:03 -0700)]
Merge pull request #306 from nico/winunbreakconf
Strip leading whitespace from commands on Windows.
Nico Weber [Tue, 5 Jun 2012 03:23:14 +0000 (20:23 -0700)]
Fix configure.py on windows, which does not permit a leading space.
Evan Martin [Mon, 4 Jun 2012 17:16:39 +0000 (10:16 -0700)]
Merge pull request #311 from nico/cleanups
Cleanups
Nico Weber [Sun, 3 Jun 2012 05:58:26 +0000 (22:58 -0700)]
add canon_perftest
Evan Martin [Sat, 2 Jun 2012 23:56:25 +0000 (16:56 -0700)]
Merge pull request #321 from nico/diff
Fix a bug that caused total_time to always be -1.
Nico Weber [Fri, 1 Jun 2012 21:00:32 +0000 (14:00 -0700)]
Remove code that was never executed.
total_time was always -1, because it computed a pointer difference,
not a time difference (should've been |*end_time - *start_time|).
Evan Martin [Sat, 2 Jun 2012 17:20:09 +0000 (10:20 -0700)]
Merge pull request #320 from nico/cleanup
Remove unused variable last_update_millis_.
Evan Martin [Sat, 2 Jun 2012 17:18:58 +0000 (10:18 -0700)]
Merge pull request #319 from nico/vimp
Make `:set spell` only check spelling in comments. Patch from Thilo Six ...
Nico Weber [Fri, 1 Jun 2012 20:50:39 +0000 (13:50 -0700)]
Remove unused variable last_update_millis_.
Nico Weber [Fri, 1 Jun 2012 17:56:41 +0000 (10:56 -0700)]
Make `:set spell` only check spelling in comments. Patch from Thilo Six <T.Six@gmx.de>!
Evan Martin [Fri, 1 Jun 2012 04:24:11 +0000 (21:24 -0700)]
Merge pull request #318 from jsternberg/master
Missing/unused header files
Jonathan Sternberg [Thu, 31 May 2012 18:36:30 +0000 (14:36 -0400)]
Missing header file for "getenv".
Jonathan Sternberg [Wed, 30 May 2012 13:46:20 +0000 (09:46 -0400)]
Removing unused sys/termios.h header.
Jonathan Sternberg [Mon, 28 May 2012 02:09:35 +0000 (22:09 -0400)]
Header guards were missing from some header files.
Thiago Farina [Wed, 23 May 2012 19:17:30 +0000 (16:17 -0300)]
No need to write 'struct' before type name when declaraing variables in C++.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Evan Martin [Wed, 23 May 2012 17:56:49 +0000 (10:56 -0700)]
Merge pull request #314 from ehird/master
Use subprocess.call for Python 2.4 compatibility
Elliott Hird [Wed, 23 May 2012 13:58:49 +0000 (14:58 +0100)]
Use subprocess.call for Python 2.4 compatibility
Evan Martin [Tue, 15 May 2012 05:28:45 +0000 (22:28 -0700)]
Merge pull request #312 from nico/vimfile
vim syntax file: Highlight ninja comments.
Nico Weber [Mon, 14 May 2012 04:34:58 +0000 (21:34 -0700)]
vim syntax file: Highlight ninja comments.
Nico Weber [Sun, 13 May 2012 01:27:49 +0000 (18:27 -0700)]
Minor spelling fixes in manual.
Nico Weber [Sun, 6 May 2012 01:18:43 +0000 (18:18 -0700)]
comment fix
Evan Martin [Thu, 10 May 2012 15:19:14 +0000 (08:19 -0700)]
Merge pull request #310 from nico/landreader
Speed up build log reading (0.5s on Win, 0.1s on Mac, 30ms on Linux)
Evan Martin [Thu, 10 May 2012 15:15:15 +0000 (08:15 -0700)]
Merge pull request #309 from nico/buildlogtest
Add more tests for BuildLog.
Nico Weber [Thu, 10 May 2012 05:20:52 +0000 (22:20 -0700)]
Switch LineReader from fgets() to just fread().
fgets() needs to search for a \n in the input, and LineReader's
strstr() did the same work again. By using fread() directly, this
duplicate work can be saved.
(I tried using readline() / fgetln() for the same saving, but those
functions are not standard, and were slower than the code in this CL.)
Results from running build_log_perftest, on OS X:
Before: min 369ms max 372ms avg 370.4ms
After: min 243ms max 247ms avg 244.8ms
On Windows:
Before: min 796ms max 904ms avg 858.0ms
After: min 359ms max 375ms avg 371.4ms
On Linux:
Before: min 161ms max 169ms avg 164.8ms
Before: min 130ms max 137ms avg 132.6ms
Nico Weber [Thu, 10 May 2012 05:13:58 +0000 (22:13 -0700)]
Pull BuildLog line reading into its own class. No performance or behavior change.
Nico Weber [Thu, 10 May 2012 03:25:48 +0000 (20:25 -0700)]
Add a BuildLog test that checks that very long command liens don't crash.
Nico Weber [Thu, 10 May 2012 03:25:07 +0000 (20:25 -0700)]
Add a BuildLog test that checks duplicate version headers don't crash.
Evan Martin [Wed, 9 May 2012 19:48:45 +0000 (12:48 -0700)]
Merge pull request #307 from sgraham/nul-input
pass subprocesses handle to nul device rather than null handle
Scott Graham [Wed, 9 May 2012 19:30:58 +0000 (12:30 -0700)]
pass subprocesses handle to nul device rather than null handle
Evan Martin [Wed, 9 May 2012 04:25:28 +0000 (21:25 -0700)]
Merge pull request #305 from nico/winperftest
Make parser_perftest and build_log_perftest link on Windows.
Nico Weber [Wed, 9 May 2012 03:40:00 +0000 (20:40 -0700)]
Make parser_perftest and build_log_perftest link on Windows.
Evan Martin [Wed, 9 May 2012 02:40:21 +0000 (19:40 -0700)]
Merge pull request #304 from nico/perftest
Add a BuildLog loading perftest.
Nico Weber [Tue, 8 May 2012 22:50:24 +0000 (15:50 -0700)]
Add a BuildLog loading perftest.
Evan Martin [Mon, 7 May 2012 04:47:46 +0000 (21:47 -0700)]
include version number
Evan Martin [Mon, 7 May 2012 15:53:26 +0000 (08:53 -0700)]
clarify what i mean by "policy"
Evan Martin [Tue, 8 May 2012 16:02:59 +0000 (09:02 -0700)]
Merge pull request #301 from nico/logfix
Don't write ninja log header to log on every build on Windows.
Nico Weber [Tue, 8 May 2012 15:37:27 +0000 (08:37 -0700)]
Don't write ninja log header to log on every build on Windows.
Evan Martin [Mon, 7 May 2012 04:36:45 +0000 (21:36 -0700)]
Merge pull request #297 from nico/colorclang
Produce colored diagnostics when building ninja with clang.
Evan Martin [Mon, 7 May 2012 04:23:49 +0000 (21:23 -0700)]
Merge pull request #299 from tfarina/explicit-ctors
views: Mark single-argument constructors as explicit.
Thiago Farina [Sun, 6 May 2012 22:31:16 +0000 (19:31 -0300)]
views: Mark single-argument constructors as explicit.
This was reported by cpplint as:
python ~/depot_tools/cpplint.py 2>&1 | grep -v "Done processing" | grep explicit
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Evan Martin [Sun, 6 May 2012 21:00:09 +0000 (14:00 -0700)]
Merge pull request #298 from tfarina/build-log-string
No need to convert log_path to c-string. Two places.
Thiago Farina [Sun, 6 May 2012 20:37:46 +0000 (17:37 -0300)]
No need to convert log_path to c-string. Two places.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Nico Weber [Fri, 4 May 2012 15:44:30 +0000 (08:44 -0700)]
Produce colored diagnostics when building ninja with clang.
This can be disabled by having -fno-color-diagnostics in CFLAGS,
or setting TERM to dumb.
Evan Martin [Fri, 4 May 2012 23:07:37 +0000 (16:07 -0700)]
mention reactos
Evan Martin [Fri, 4 May 2012 23:04:59 +0000 (16:04 -0700)]
mention platform support
Evan Martin [Fri, 4 May 2012 21:50:16 +0000 (14:50 -0700)]
Merge pull request #296 from nico/confenv
Let configure.py remember its environment for rerunning.
Evan Martin [Fri, 4 May 2012 21:46:05 +0000 (14:46 -0700)]
Merge pull request #294 from nico/fastercanonpath
Make CanonicalizePath() 47% faster on mac, 37% faster on linux.
Nico Weber [Fri, 4 May 2012 21:25:32 +0000 (14:25 -0700)]
First check for string end, then dereference. (5ms more expensive, heh.)
Nico Weber [Fri, 4 May 2012 21:20:33 +0000 (14:20 -0700)]
Do not access os.environ directly.
Nico Weber [Fri, 4 May 2012 15:33:46 +0000 (08:33 -0700)]
Let configure.py remember its environment for rerunning.
Without this, CXX is lost when ninja decides that it's time to
regenerate build.ninja, which makes performance tweaking surprising.
Nico Weber [Fri, 4 May 2012 01:18:03 +0000 (18:18 -0700)]
Don't walk path components twice. Speeds up CanonicalizePath() 115ms (285ms -> 170ms).
Nico Weber [Fri, 4 May 2012 01:15:15 +0000 (18:15 -0700)]
Reorder a few lines, no functionality (or perf) change.
Nico Weber [Fri, 4 May 2012 01:14:34 +0000 (18:14 -0700)]
Skip single '/' characters earlier in the loop. 300ms -> 285ms.
Nico Weber [Thu, 3 May 2012 23:13:40 +0000 (16:13 -0700)]
Speed up CanonicalizePath() 6.8% (322ms -> 300ms for chrome empty build).
Evan Martin [Wed, 2 May 2012 03:46:34 +0000 (20:46 -0700)]
clarify a flag in configure.py
(The -g flag is always on, --debug just adds e.g. libstdc++'s extra
debugging features.)
Related to issue #286.
Evan Martin [Fri, 27 Apr 2012 20:16:14 +0000 (13:16 -0700)]
add $: to docs
Evan Martin [Wed, 2 May 2012 03:34:21 +0000 (20:34 -0700)]
Merge pull request #291 from nico/ocd
Fix layout width in ninja_syntax.py.
Evan Martin [Wed, 2 May 2012 03:33:41 +0000 (20:33 -0700)]
Merge pull request #290 from nico/metrics
Add .ninja_log load time to metrics.
Evan Martin [Wed, 2 May 2012 03:30:17 +0000 (20:30 -0700)]
Merge pull request #284 from nico/fixwinbuild
Fix Windows build.
Evan Martin [Wed, 2 May 2012 03:29:57 +0000 (20:29 -0700)]
Merge pull request #283 from tfarina/string-ampersand
Put & operator with the type rather than the variable name.
Nico Weber [Wed, 2 May 2012 01:26:51 +0000 (18:26 -0700)]
Fix layout width in ninja_syntax.py.
The last line would sometimes be needlessly longer than the layout
width. One example is line 67 in the build.ninja generated by
ninja's own configure.py: Before this patch, ninja_syntax would
create a 81 character line.
Nico Weber [Tue, 1 May 2012 15:42:35 +0000 (08:42 -0700)]
Add .ninja_log load time to metrics.
On my system, it takes 22% of the empty build time for chrome.
Evan Martin [Tue, 1 May 2012 05:35:58 +0000 (22:35 -0700)]
Merge pull request #288 from nico/buildfix
ninja_syntax.build() returns a list, not a single string.
Nico Weber [Tue, 1 May 2012 03:15:30 +0000 (20:15 -0700)]
ninja_syntax.build() returns a list, not a single string.
Fixes 'multiple rules' warnings on mac/linux.
Evan Martin [Mon, 30 Apr 2012 16:22:19 +0000 (09:22 -0700)]
Merge pull request #285 from nico/winninjatest
Make it possible to write `ninja ninja_test` on windows (as opposed to `ninja ninja_test.exe`). Also `ninja ninja`.
Evan Martin [Mon, 30 Apr 2012 16:21:32 +0000 (09:21 -0700)]
Merge pull request #287 from nico/gtestnortti
Fix ninja_test build with clang, build without rtti on windows.
Nico Weber [Mon, 30 Apr 2012 15:40:34 +0000 (08:40 -0700)]
Explicitly pass -DGTEST_HAS_RTTI to fix building ninja_test with clang.
Nico Weber [Mon, 30 Apr 2012 15:40:12 +0000 (08:40 -0700)]
Build without RTTI on windows (/GR-), saves 1kB and is consisten with linux/mac.
Nico Weber [Mon, 30 Apr 2012 15:11:21 +0000 (08:11 -0700)]
Provide 'ninja' as alias for 'ninja.exe' too. Tidy up.
Nico Weber [Mon, 30 Apr 2012 15:06:28 +0000 (08:06 -0700)]
Provide 'ninja_test' as alias for 'ninja_test.exe' on windows.