summaryrefslogtreecommitdiffstats
path: root/src/util.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* | note that -l doesn't work on windowsEvan Martin2012-07-281-0/+1
| | | | | | | | Filed issue #386 about it too.
* | simplify load-average codeEvan Martin2012-07-281-15/+3
|/
* rearrange minidump patch to match ninja code styleEvan Martin2012-07-271-79/+0
|
* Merge branch 'set_terminate' of git://github.com/gmoudry/ninja into minidumpEvan Martin2012-07-271-0/+79
|\ | | | | | | | | | | | | (This likely doesn't compile, just getting all the history in place.) Conflicts: src/util.cc
| * Changed #ifdef _WIN32 to #ifdef _MSC_VER to make sure that MinGW compiles ↵Jiri Moudry2012-04-261-2/+2
| | | | | | | | happily
| * Improve handling of fatal errors on Windows, support creation of minidumpsJiri Moudry2012-03-281-0/+78
| |
* | Merge pull request #351 from syntheticpp/rateEvan Martin2012-07-271-10/+0
|\ \ | | | | | | print edges per second
| * | print edges per secondPeter Kuemmel2012-07-151-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prints the rate of finished edges per second to the console, for instance with NINJA_STATUS="[%s/%t %o(%c)/s] ": [132/1922 16.1(14)/s] 16.1 is the average for all processed files (here 132 since start) 14 is the average of the last n files while n is the number specifies by -j (or its default)
* | | Use lowercase consistently.Thiago Farina2012-07-201-3/+3
|/ / | | | | | | | | | | https://github.com/martine/ninja/issues/360 Signed-off-by: Thiago Farina <tfarina@chromium.org>
* | First check for string end, then dereference. (5ms more expensive, heh.)Nico Weber2012-05-041-2/+2
| |
* | Don't walk path components twice. Speeds up CanonicalizePath() 115ms (285ms ↵Nico Weber2012-05-041-6/+2
| | | | | | | | -> 170ms).
* | Reorder a few lines, no functionality (or perf) change.Nico Weber2012-05-041-5/+4
| |
* | Skip single '/' characters earlier in the loop. 300ms -> 285ms.Nico Weber2012-05-041-8/+11
| |
* | Speed up CanonicalizePath() 6.8% (322ms -> 300ms for chrome empty build).Nico Weber2012-05-041-8/+9
| |
* | Add -l N option to limit the load average.Nicolas Despres2012-04-191-0/+29
| | | | | | | | | | | | | | This is similar to GNU make -l/--load-average option. It limits the number of job started if the load average exceed the given value. It can be very useful when running ninja on a continuous integration server where we want to use parallelism as much as possible without overloading the server.
* | Fix windows build (add #include <io.h>)Qingning Huo2012-03-151-0/+1
|/
* Add a Windows version of SetCloseOnExec()Qingning Huo2012-03-131-3/+4
|
* don't crash when CanonicalizePath removes all path componentsEvan Martin2012-02-041-0/+5
| | | | From a patch from Peter Kuemmel <syntheticpp@gmx.net>.
* check access to first element of string: string could be emptyPeter Kuemmel2012-01-231-1/+4
|
* windows: use _WIN32 define everywhereEvan Martin2012-01-221-2/+2
| | | | Rather than mixing use of WIN32 and _WIN32.
* Strip ansi escape sequences from subcommand output when not writing to a ↵Nico Weber2012-01-191-0/+28
| | | | smart terminal.
* remove string copy while loading depfilesEvan Martin2012-01-091-0/+1
|
* split canonicalizeEvan Martin2012-01-091-5/+12
|
* track canonicalize metricEvan Martin2012-01-061-0/+2
|
* allow spellcheck to be used with a vector of stringsEvan Martin2012-01-041-11/+17
|
* Use ExitProcess instead of exit in Fatal to allow extra cleanup for MSVCFrances Buontempo2012-01-041-0/+8
|
* Capitalize "error" to match with the other utility functions.Thiago Farina2011-12-201-1/+1
| | | | | | | Fatal and Warning functions already output their strings capitalized, we were just missing the Error function. So capitalize it now. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* factor out windows perror equivalentEvan Martin2011-12-201-0/+21
|
* Remove warning triggered by -Wextra on MinGW.Nicolas Despres2011-11-191-1/+2
|
* Add spelling suggestions for four cases:Nico Weber2011-11-161-0/+25
| | | | | | | | | | | 1. For targets, when invoking ninja to build a target. 2. For targets, when doing a "query" command. 3. For command names. 4. For the subcommands of the "targets" command. Also change CmdTargets() to call LookupNode() instead of GetNode() -- since the result was checked for NULL, that's probably what was intended here originally.
* move SetCloseOnExec to utilEvan Martin2011-10-311-0/+16
|
* make CanonicalizePath report an error on empty pathEvan Martin2011-10-061-1/+7
| | | | Fixes part of issue 121, but the fix exposed a further issue.
* semantic change: allow reaching into parent directories in pathsEvan Martin2011-08-241-72/+42
| | | | | | | | | | | This allows generating build files in a subdirectory of your source tree. - Change CanonicalizePath to accept this. - CanonicalizePath no longer has an error condition, so change it to a void function. I profiled the result against Chrome and it might be ~100ms slower, but that might just be Chrome's size working against me. In any case I think there are lower-hanging performance fruit elsewhere.
* remove +x bit from sourceEvan Martin2011-06-031-0/+0
|
* Tests now build on a native Windows build (tested with VS2010)Philip Craig2011-05-281-0/+3
| | | | | All tests except SubProcess pass on a native Windows build Tests continue not to build on a platform=mingw build
* move GetTimeMillis to utilEvan Martin2011-05-241-0/+16
|
* move ReadFile into utilEvan Martin2011-05-241-0/+23
|
* don't mangle absolute paths in the canonicalizerEvan Martin2011-05-171-1/+1
| | | | | We frequently do use absolute paths when depfiles refer to e.g. /usr/include/stdio.h.
* Needed more path components to build Chrome. One path component in an uncommonScott Byer2011-05-031-1/+1
| | | | sub-library ended up with 27 slashes in it.
* Add a Warning() report function.Nicolas Despres2011-05-021-0/+9
| | | | Also fix sites where Error() was misused.
* windows: abstract around mkdir vs _mkdirEvan Martin2011-05-021-0/+14
|
* use kMaxPathComponents in proper placeEvan Martin2011-04-231-1/+1
|
* optimize CanonicalizePathEvan Martin2011-04-231-34/+69
| | | | | | | | | Null build of Chrome: before I added extra calls to CanonicalizePath: 1.25s. with extra calls to CanonicalizePath: 1.35s. with new CanonicalizePath: 1.05s. And now CanonicalizePath isn't hot on profiles anymore.
* handle foo//bar in CanonicalizePathEvan Martin2011-04-221-2/+4
|
* Merge branch 'master' of github.com:martine/ninjaEvan Martin2011-04-151-1/+10
|\ | | | | | | | | | | Conflicts: src/util.cc src/util.h
| * Prefix error messages with program name.Nicolas Despres2011-03-211-1/+10
| | | | | | | | | | | | It make it easier while debugging to know who is reporting the error: Ninja itself or one of the command called by Ninja during the build process or one of the generator which called Ninja.
* | Move CanonicalizePath into util.h so it can be shared by the other modules.Thiago Farina2011-04-151-0/+54
|/ | | | | | Also add util_test.cc and move the CanonicalizePathTest into there. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* drop DumpBacktraceEvan Martin2011-02-281-9/+0
| | | | It wasn't that helpful; simplifies other platforms to just not use it.
* add copyrightsEvan Martin2011-02-061-0/+14
|
* move src into subdirEvan Martin2010-12-051-0/+24