summaryrefslogtreecommitdiffstats
path: root/src/ninja.cc
Commit message (Collapse)AuthorAgeFilesLines
* browse: support --port and --no-browser optionsPeter Wu2016-03-111-5/+1
| | | | | | | Add --port option to override the default port (8000). Add --no-browser option to avoid opening a web browser (useful over SSH). Make the target name optional, using "all" if omitted.
* Fix ambiguous call to set_terminate on Windows platformg4m42016-02-171-1/+1
| | | | | | | On Windows set_terminate() could either be the standard C++ one or (actually the same one but in the global namespace) the CRT one declared in corecrt_terminate.h Hence this ambiguity - this patch solves it. Signed-off-by: g4m4 <misept.dieseneuf@gmail.com>
* Replace ManifestParser::FileReader with general FileReaderBrad King2016-02-031-10/+1
| | | | | | Avoid having two separate filesystem interfaces. Simplify test infrastructure by avoiding custom `ManifestParser::FileReader` implementations.
* Merge pull request #1096 from sgraham/dupe-edge-actionNico Weber2016-01-291-1/+3
|\ | | | | dupe_edge_should_err from bool to enum
| * dupe_edge_should_err from bool to enumScott Graham2016-01-271-1/+3
| |
* | Add -d keepdepfile to preserve depfilesShinichiro Hamaji2016-01-281-5/+10
|/ | | | | This is useful when you are developing a tool which generates GCC-style depfiles.
* Remove unnecessary `std::`Tetsuo Kiso2016-01-101-2/+2
|
* Do not attempt to rebuild infinitely in dry-run mode.Nicolas Despres2015-12-091-0/+4
|
* Merge pull request #1007 from mikesep/aixEvan Martin2015-11-121-0/+3
|\ | | | | Support for AIX
| * Fix getopt for AIXMike Seplowitz2015-08-191-0/+3
| | | | | | | | | | | | | | AIX supplies getopt but not getopt_long. We can't use the embedded getopt implementation, since the constness of its arguments doesn't match the AIX system routine.
* | Make links point to org pageNico Weber2015-11-111-1/+1
|/
* Some mucking with std:: for set_terminate and terminate_handlerScott Graham2015-08-101-1/+1
|
* win: print right slashes in 'unknown target' messageNico Weber2015-07-101-3/+3
|
* Let Stat() have an err outparam instead of writing to stderr.Nico Weber2015-03-311-2/+11
| | | | | | | | | Also check for Stat() failure in a few more places. This way, ninja doesn't print two "ninja: error: " lines if stat() fails during a build. It also makes it easier to keep the stat tests quiet. Every caller of Stat() needs to explicitly log the error string if that's desired.
* Add an opt-in flag to make duplicate edges an error (`-w dupbuild=err`).Nico Weber2015-03-241-3/+38
| | | | | This is step 1 on #931. Duplicated edges will become an error by default in the future.
* Swap order of -k and -l in help output, to keep the list alphabetized.Nico Weber2015-03-241-1/+1
|
* Allow manifest rebuild to loop up to 100 timesColin Cross2015-02-031-14/+13
| | | | | | | | | Ninja generators that bootstrap themselves with Ninja may need to rebuild build.ninja multiple times. Replace the 2 cycle loop with a 100 cycle loop, and print the pass number each time it restarts. Original-author: Jamie Gennis <jgennis@gmail.com>
* Revert #223, fixes #874.Nico Weber2014-12-041-5/+4
| | | | | | | | No test since there's still no good way to test code in ninja.cc. Going forward, either move NinjaMain to its own file with tests, or create a system that makes it possible to run integration tests on the ninja binary. Instead, add a comment that explains why the restat optimization isn't done.
* drop NINJA_BOOTSTRAP defineEvan Martin2014-11-181-1/+1
|
* Make sure configure.py and ninja.cc always agree on if -t browse is included.Nico Weber2014-11-141-2/+2
| | | | | | | | | No behavior change on most platforms. On solaris, -t browse was compiled in in ninja.cc but browse.cc wasn't compiled in, which probably means that building on Solaris didn't work. It might be better now. This also makes browse.cc automatically not included in bootstrap builds; previously this was done manually through the NINJA_BOOTSTRAP check.
* fix order of args to CanonicalizePathScott Graham2014-11-091-2/+2
|
* remove CanonicalizePath overloads, test for toplevel behaviourScott Graham2014-11-091-2/+4
|
* Remove extra info from Usage()kwesolowski2014-07-261-3/+0
| | | | As now behavior is similar on on platforms, this can probably be removed
* Small usage info fix for windowskwesolowski2014-07-251-1/+1
|
* Fixed/improved -l N documentation For windowskwesolowski2014-07-251-1/+1
| | | | | On windows "system load" is not so obvious term, added line explaining N argument in -l N
* Merge pull request #755 from zmodem/working_dir_vs_msvc_toolNico Weber2014-06-291-8/+9
|\ | | | | Process the -C option before running RUN_AFTER_FLAGS tools.
| * Process the -C option before running RUN_AFTER_FLAGS tools.Hans Wennborg2014-05-031-8/+9
| | | | | | | | | | | | | | | | | | | | This brings the flag more inline with its description: "change to DIR before doing anything else". The use case is to make it possible to use -C together with -t msvc. When debugging Windows builds, it's handy to be able to copy-paste the commands from "ninja -v" and make them run in the correct directory by adding this flag.
* | Rename -d nowinstatcache to -d nostatcache; might become useful elsewhere (#787)Nico Weber2014-06-271-5/+5
| |
* | do not delete files from the logs that still exist on diskNico Weber2014-06-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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!
* | add some statcache testsNico Weber2014-06-151-2/+2
| |
* | Free cache memory once it's no longer used.Nico Weber2014-06-151-7/+2
| | | | | | | | | | Doesn't slow down empty build times measurably, and saves some memory on non-empty builds.
* | on by defaultNico Weber2014-06-151-4/+4
| |
* | make win-onlyNico Weber2014-06-151-0/+4
| |
* | simplify more, move behind flagNico Weber2014-06-151-4/+11
| |
* | Turn on stat cache. Empty builds of chrome on my laptop 4s -> 1.3s (!)Nico Weber2014-06-151-1/+1
| |
* | Add a stat cache. Demo-quality, and disabled atm.Nico Weber2014-06-151-0/+6
| |
* | spellcheck "keeprsp" in -d optionsNico Weber2014-06-151-1/+1
| |
* | compdb: check that inputs is not emptyBen Boeckel2014-05-051-0/+2
|/
* Make BuildLogUser reference constant.Nico Weber2014-01-071-1/+1
|
* Add a comment.Nico Weber2014-01-041-0/+7
|
* Rename "IsDead" to "BuildLogUser".Nico Weber2014-01-041-3/+3
|
* Move duplicated code into a helper function.Nico Weber2014-01-041-3/+1
|
* Remove dead entries in .ninja_log and .ninja_deps while recompacting.Nico Weber2014-01-021-3/+8
| | | | | | | | | | For .ninja_deps, remove objects that have no in-edges or whose in-edges do not have a "deps" attribute. (This matches the behaviour of `-t deps`). BuildLog doesn't know about state, so let its recompact method take delegate that decides is a path is life or not, and implement it in NinjaMain.
* add -d keeprsp to preserve @rsp files on success on windowsScott Graham2013-09-101-1/+5
|
* Fix the browse tool.Tony Chang2013-07-261-2/+3
| | | | | | | ReadFlags was altering argv in real_main causing us to pass the wrong value into the NinjaMain constructor. Fix this by storing the ninja command before real_main runs.
* Merge pull request #616 from nico/recompactEvan Martin2013-07-081-4/+32
|\ | | | | Add a 'recompact' tool, which forces recompaction of the build and deps ...
| * Add a 'recompact' tool, which forces recompaction of the build and deps logs.Nico Weber2013-07-081-4/+32
| | | | | | | | This is useful for performance comparisons between two build directories.
* | Introducing tool 'deps' dumping ninja deps log entriesMaxim Kalaev2013-07-081-0/+42
|/
* Fix mingw based builds. Fixes #587Jon2013-05-251-2/+2
|
* refactor ninja main() into a struct with methodsEvan Martin2013-05-241-159/+203
| | | | | This removes the ugly Globals struct, and the ResetState() hack. This also eliminates the only goto!