| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Improve error messages when ninja commands fail on Windows.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When a call to the Win32 API CreateProcessA fails, ninja
now outputs the exact command string that caused it to fail.
It also detects when the command contained leading whitespace
and outputs a hint that lets the user know why the command
failed.
|
| |
| |
| |
| |
| | |
fixes #1741
fixes #1736
|
| | |
|
| |
| |
| |
| |
| | |
This results in a huge speed up for large builds (e.g. Chromium). See
#1718.
|
| |
| |
| |
| |
| | |
This will become handy when the generator only wants to restat the
build.ninja entry in the log. See #1718.
|
|\ \ |
|
| |\ \
| | | |
| | | | |
manifest_parser: remove multi-output depslog restriction
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This ensures the current behavior of rejecting this case due to `x`
being reused as an input.
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Add restat tool which recalculates all mtimes in the build log
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The conditional `(!n || !n->in_edge()) && ` was moved up. It now needs
to be inversed because there's a `return false;`. See
https://github.com/ninja-build/ninja/commit/3beebde51a2089ecb01820f1428efe0263deaeea#diff-78294872cbf9d32f4f972288561fa718R146
and
https://github.com/ninja-build/ninja/pull/1432#discussion_r321827528
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Quoting from the Linux man page for errno,
"The value in errno is significant only when the return value of the call
indicated an error (i.e., -1 from most system calls; -1 or NULL from most
library functions); a function that succeeds is allowed to change errno. The
value of errno is never set to zero by any system call or library function."
Successful calls to getcwd are allowed to set errno causing the compilation
database not to be written. Spurious failures of this nature were observed on
AIX.
Adjust the error handling for getcwd so that errno is only checked if the call
returned NULL.
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Modifying a key in C++ associative containers is UB.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Modifying a key in C++ associative containers is UB.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| |\ \
| | | |
| | | | |
Fix invalid preprocessor #if
|
| | | | |
|
| | | | |
|
| |/ /
| | |
| | | |
Return value of ManifestParser::ParseEdge shoule be boolean
|
| | | |
|
| |\ \
| | | |
| | | | |
Ensure substring indexing never goes negative
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With widths lower than 4, the ElideMiddle function would crash because
its substring access would wrap around and attempt to access the max
size_t value. This patch fixes that.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
This reverts commit cfd0bd3007b291df505f8c45083453310142d681.
See #1662.
|
| | |
| | |
| | |
| | |
| | | |
Accessing inputs_[0] when it's empty results in an assert when running
in debug. Avoid it by using data() if available.
|
| |/
| |
| |
| |
| |
| |
| | |
* build: constify EdgeWanted()
* build: constify a bit of CommandRunner
* graph: constify functions of struct Edge
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
| |
| |
| |
| | |
* No perfstat for IBM i (OS400) AIX variant
* Allow for future IBM i to identify as 'os400'
|
| |\
| | |
| | | |
Enable ninja to use > 64 CPUs on Windows
|
| | | |
|
| |\ \
| | | |
| | | | |
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
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
but are no longer produced by the current manifest. For now adding a dedicated
"-t cleandead" option, since it should be run after reading the log; ideally
it should be part of the build config and done before to start looking for
dirty targets so that an incremental build would produce the same end result
as a clean build from scratch. But since I am not 100% sure to understand the
comment in the NinjaMain::isPathDead(), I opted to make it a tool for now to
avoid impacting users who want to keep those files.
The option name "cleandead" was selected insteadof something like "reap" to
keep the "clean" prefix.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|