| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While #1780 delayed opening .ninja_log until the first write, this
this didn't fully fix the issue on Windows: There might be build
statements which run before the generator resulting in an actual write
to .ninja_log.
To fix this once and for all the BuildLog now gets closed before running
the generator. BuildLog::log_file_path_ won't be cleared so that it can
be opened again after the generator finished.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
symbols
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
header files
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
[clang-tidy] fix small false positive
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
else if has to be on the same line it seems.
Found with readability-misleading-indentation
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
[clang-tidy] remove redundant member init
|
| | |/ / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Found with readability-redundant-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously the script would generate some output and return a zero
error code, even if the calls to `od` or `sed` failed.
This change ensures that:
- If `od` or `sed` fail then the script will fail.
- Output will only be written on success.
|
|\ \ \ \ \ \
| |/ / / / / |
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Delay actually opening log files until the first write, fix #1724
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Calling DepsLog/BuildLog::OpenForWrite will now only save the file path.
The actual opening of the file (moved to OpenForWriteIfNeeded) happens
right before the first write attempt.
This is needed so that the files aren't held open when the generator
runs (i.e. RebuildManifest) as it may call tools like recompact which
won't be able to open the file on Windows.
The disadvantage is that now the error reporting happens at a later time
and will be reported as a failed write, not a failed open.
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Include sys/select.h in subprocess-posix.cc
|
| | | |/ / / /
| | |/| | | |
| | | | | | |
| | | | | | |
| | | | | | | |
pselect() is in sys/select.h in "newer" (2001) versions of posix, so add an include for it.
While here, only include poll.h if USE_PPOLL is defined.
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
stat() needs unistd.h in addition to sys/stat.h and sys/types.h per POSIX.
At least one (hobby) OS does need unistd.h, so add an include for it.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Found with readability-container-size-empty
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Found with readability-redundant-string-cstr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Added ability to parse escaped colons in GCC Dep files enabling ninja to parse dep files of GCC 10 on Windows
* Added generated depfile_parser.cc
* Addressed formatting
* Added extra tests with real world examples of paths produced by both GCC 10 and Clang and GCC pre 10. Adjusted one test so it doesn't fail
* Adjusted regular expression to not match \: if the character following the : is either EOF or whitespace
* Fixed typo in regex (should be 0x20 for space not 0xa)
* Changed regular expression form using lookahead to instead matching a separate expression. This was needed as re2c pre version 1.17 is broken when using lookaheads. Also added tests for \: followed by whitespace
* Addressed formatting
* Forgot a missing std::
* Fixed formatting for spaces after , as well as respecting column width
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
MSVC also used the custom implementation, since the function isn't a
macro and therefore
#ifndef _mktemp_s
didn't work as intended.
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
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
|
| | | | | |
|