| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Use st_mtim if st_mtime is macro, fix #1510
|
| |
| |
| |
| |
| | |
In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
compatibility macro. Should help avoid hardcoding platform detection.
|
| | |
|
|\ \
| | |
| | | |
Emit "FAILED: " in red if terminal supports ANSI color output
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
#1492 add column headers to .ninja_log
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The option is called "depfile = gcc" and should support depfiles created
by GCC. GCC does not escape backslashes and GNU Make does not try to
unescape it, so neither should Ninja try to "unescape" it.
Only space (' ') and hash sign ('#') are specially treated by GCC/Clang.
Note that while tabs are also treated specially by GCC, Clang does not,
so do not special case it (why would someone use tabs in a filename?).
Support for 2N trailing backslashes in a filename is a bit questionable,
but is added to be as consistent as possible with GCC/Clang.
See also
https://github.com/llvm-mirror/clang/blob/44c160f916a1b080098b17b466b026aa07475ec2/lib/Frontend/DependencyFile.cpp#L316
https://github.com/gcc-mirror/gcc/blob/22a8377023d59cc01ab0a84a1df56d0e1336efa3/libcpp/mkdeps.c#L47
Fixes https://github.com/ninja-build/ninja/issues/1262
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Some outputs may not be known in the main build manifest and are instead
discovered through a dyndep binding. Load dyndep files that are
available during cleaning so that we can clean these outputs too.
|
| |
| |
| |
| |
| |
| |
| |
| | |
`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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
After finishing an edge that produces a dyndep file, load the file and
update the build graph structure. Recompute the dirty state of all its
dependents and of newly reachable portions of the graph. Add edges to
the build plan that are discovered to be wanted. Finally, schedule
edges that are wanted and now ready to build.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The full readiness of a node that has a dyndep binding cannot be known
until after the dyndep file is loaded. If a dyndep file is ready while
constructing the build plan it can be loaded immediately so full
information can be used to decide whether anything needs to be built.
If a dyndep file is not ready while constructing the build plan then the
edges naming it cannot be ready either because the dyndep file is one of
their inputs. In this case we defer loading the dyndep file until the
build plan is being executed.
|
| |
| |
| |
| |
| | |
Add a LoadDyndeps method to load a dyndep file and update
the edges that name it in their dyndep binding.
|
| |
| |
| |
| |
| |
| | |
Allow rules or build statements to specify one of the build statement
inputs in a "dyndep" binding. This will later be used to load
dependency information from the specified file.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Define a file format suitable for specifying dynamically-discovered
dependency information for build edges. Design a format inspired by the
build manifest format and using the same lexer. Start with a required
format version specification followed by "build" statements that add
implicit inputs and outputs to existing edges.
|
| |
| |
| |
| |
| |
| | |
Track for each Edge whether depfile information has been loaded using an
explicit flag. This will allow RecomputeDirty to be repeated for an
edge without loading deps again.
|
| |
| |
| |
| |
| |
| |
| | |
In order to later support dynamic updates to the build plan while
building, the Plan will need access to its Builder. Since this access
will be needed only for specific features we can avoid updating all Plan
constructions in the test suite by making this access optional.
|
| |
| |
| |
| |
| | |
Move the logic to a new Plan::EdgeMaybeReady method so it can be re-used
elsewhere.
|
| |
| |
| |
| |
| | |
Move the logic to mark edges as wanted over to a Plan::EdgeWanted method
so it can be re-used elsewhere later.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace our single active edge pointer with a vector and add a
parameter that tests can set to limit the number of concurrent
edges. Set the default to 1 to preserve the current behavior.
Specific tests will be able to override it later to simulate
concurrent builds.
|
| |
| |
| |
| |
| |
| |
| | |
Add an 'err' string argument and return a boolean for success. Update
call sites to pass an 'err' string argument and check the return value.
This will be useful later for adding logic to these methods that may
fail.
|
| |
| |
| |
| |
| | |
This method should be called only with edges that have not
already been started.
|
| |
| |
| |
| |
| |
| | |
Create a Parser base class that holds parser functionality not specific
to the build manifest file format. This will allow it to be re-used for
other parsers later.
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
Add reading of TERM variable for win32 dumb terminals
|
| |
| |
| |
| | |
Fixes #1278.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we handle Makefile rules of the form:
out: in1 in2 in3
and the form:
out: in1 \
in2 \
in3
Teach the depfile parser to handle the additional form:
out: in1
out: in2
out: in3
This is also valid Makefile syntax and is the depfile format
generated by the Intel Compiler for Windows.
Note that the `gcc -MP` option adds empty phony rules to the generated
Makefile fragment:
out: in1 in2 in3
in1:
in2:
in3:
Previously we tolerated these because they were treated as inputs, which
was accidentally correct. Instead we must now tolerate these by
ignoring targets for which no dependencies are specified.
|
|
|
|
|
|
|
| |
Escape newlines for line continuation in the SpecialChars test case.
Otherwise the test does not cover valid Makefile syntax. The missing
line continuation was tolerated by our parser but is never (not)
produced by a real compiler.
|
|
|
|
|
| |
Re-arrange the existing logic to support later addition of post-token
code even for empty tokens.
|
| |
|
| |
|
|\
| |
| | |
Win32 invalid parameter help
|
| |
| |
| |
| |
| | |
This is generally associated with the command line being too long. Give
a hint to this case in the error message.
|
| |
| |
| |
| |
| | |
The callsite might have extra context which is helpful for interpreting
the error message.
|
|\ \
| | |
| | | |
Enable ANSI escape sequences on Windows 10 terminals
|
| | | |
|
|\ \ \
| | | |
| | | | |
browse.py: fix delay with multiple connections
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When Firefox opens two TCP connections and sends a request over the
second connection, it is not processed until the first one is closed.
Use a threaded server to solve this issue. Tested with Python 2.7.15 and
3.6.5. (Also tested with 2.6, but that failed due to lack of argparse.)
Link: https://bugs.python.org/issue31639
|