| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This tool is useful for writing shell completion script for tools
expecting a rule name as argument.
The tool was dropped by 34b46f28c.
Fix #1024.
|
| |
|
|
|
|
|
|
| |
Teach the `-t graph` tool to load dyndep files because they are part of
the build graph. Issue a warning when the dyndep file cannot be loaded
cleanly. This will help users visualize the complete build graph.
|
|
|
|
|
|
|
|
| |
`Cleaner` provides two constructors that are the same except that one
constructs a "real" disk interface internally and the other takes a
caller-provided disk interface. A real disk interface is already
available at the only call site for the former constructor. Use it
directly and drop the unnecessary constructor variant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to introduction of depfile parser handling of multiple rules,
ninja silently accepted a depfile of the form:
out: in1 in2 in3
other: otherIn1 otherIn2 otherIn3
and incorrectly treated `other` and `otherIn*` as additional inputs to
`out`. Now we prefer to reject this just as we already do for a depfile
specifying multiple outputs on one line. However, this can break
existing cases where such a depfile was silently tolerated.
Add a `-w depfilemulti={err,warn}` option to control this behavior,
and make it just a warning by default.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
You can still opt out of this by passing `-w dupbuild=warn`.
But if you're getting this diagnostic, your build files are incorrect
and you should ideally just fix them.
This is step 3 on https://github.com/ninja-build/ninja/issues/931
I sent an RfC to ninja-build a few months ago; nobody objected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
References to response files in a clang compile_commands.json file can
be tricky to deal with when tooling expects all the command flags to be
present in the 'command' field.
This change introduces a '-x' option to '-t compdb' that will expand
@rspfile style response file invocations inline.
E.g.
```sh
$ ninja -t compdb cc
[
{
"directory": "/src/foo",
"command": "cc -foo -bar @foo.obj.rsp",
"file": "foo.cc"
}
]
$ ninja -t compdb -x cc
[
{
"directory": "/src/foo",
"command": "cc -foo -bar foo.cc",
"file": "foo.cc"
}
]
```
|
|\
| |
| | |
Don't clean up after ourselves when exiting.
|
| |
| |
| |
| |
| |
| | |
Destruction of NinjaMain can be an expensive operation when dealing
with stupidly large ninjafiles. exit directly instead of returning out
of real_main to avoid doing so.
|
|\ \
| | |
| | | |
Update Usage to show "-k 0" behavior
|
| |/
| |
| | |
For "-k N", N==0 is interpreted as infinite. It's useful but not documented in the help, unfortunately.
|
|/ |
|
|\
| |
| | |
Use high-resolution timestamps
|
| |
| |
| |
| | |
This prepares it for higher-resolution timestamps.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v1.8.0^2~3^2~1 (Teach RecomputeDirty to detect cycles in
the build graph, 2015-11-13) we correctly reject self-referencing phony
build statements like
build a: phony a
as cycles. Unfortunately this breaks support for CMake 2.8.12.x and
3.0.x because those versions incorrectly produce edges of this form
(that we used to tolerate). In order to preserve compatibility with
those CMake versions we need to restore tolerance of these edges.
Add a special case to the manifest parser to filter out self-referencing
inputs of phony edges of the form produced by those CMake versions.
Warn by default, but add a `-w phonycycle={err,warn}` option to make it
an error.
Fixes: #1322
|
|
|
|
|
|
| |
This will allow more options to be added without updating everywhere
that constructs a ManifestParser. Also extend the AssertParse function
to take the options so tests can control them.
|
|
|
|
|
|
|
|
| |
As a fix for #874, we started reloading the entire manifest even if the
manifest was never rebuilt due to a restat rule. But this can be slow,
so call State::Reset instead, which also fixes the original crash.
Fixes #987
|
|\
| |
| | |
Allow more path components
|
| |
| |
| |
| |
| |
| |
| | |
- 60 instead of 30 path components
- 64 instead of 32 backslashes in a path (windows only)
Issue: 1161
|
|/ |
|
|
|
|
|
| |
Pass the value of -f to the browse python script so it can be passed
back to ninja -t query.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Avoid having two separate filesystem interfaces. Simplify test
infrastructure by avoiding custom `ManifestParser::FileReader`
implementations.
|
|\
| |
| | |
dupe_edge_should_err from bool to enum
|
| | |
|
|/
|
|
|
| |
This is useful when you are developing a tool which generates
GCC-style depfiles.
|
| |
|
| |
|
|\
| |
| | |
Support for AIX
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is step 1 on #931. Duplicated edges will become an error by default in
the future.
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|