| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The tool looks for targets that depend on a generated file, but do not
properly specify a dependency on the generator. It needs to be run after
a successful build, and will list all potential flakes that may have
broken the build, but didn't due to accidental build step ordering.
The search relies on the correctness of depfile and generator output
information, but these are usually easier to get right than dependencies.
The errors found can usually be verified as actual build flakes by trying
to build the listed problematic files alone in a clean build directory.
Such builds usually fail with a compile job lacking a generated file.
There is some overlap between this tool and 'gn check', but not everyone
uses gn, not everyone using gn uses gn check, and most importantly, gn
check is more about modularity, and less about actual build-time deps
without flakes.
The tool needs to be run after a build completes and depfile data is
collected. It may take several seconds to process, up to a dozen or
two on a large, chromium-sized build.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Extract an usable helper to load depfile dependencies without adding them
to the graph.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use UTF-8 on Windows 10 Version 1903, fix #1195
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Allows Ninja to use descriptions, filenames and environment variables
with characters outside of the ANSI codepage on Windows. Build manifests
are now UTF-8 by default (this change needs to be emphasized in the
release notes).
WriteConsoleOutput doesn't support UTF-8, but it's deprecated on newer
Windows 10 versions anyway (or as Microsoft likes to put it: "no longer
a part of our ecosystem roadmap"). We'll use the VT100 sequence just as
we do on Linux and macOS.
https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page
https://docs.microsoft.com/en-us/windows/console/writeconsoleoutput
https://docs.microsoft.com/de-de/windows/console/console-virtual-terminal-sequences
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Status changes to support frontends
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Send all output after manifest parsing is finished to the Status
interface, so that when status frontends are added they can handle
build messages.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Make BuildStatus an abstract interface, and move the current
implementation to StatusPrinter, to make way for a serialized
Status output.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Store the number of running edges instead of trying to compute it
from the started and finshed edge counts, which may be different
for starting and ending status messages. Allows removing the status
parameter to PrintStatus and the EdgeStatus enum.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The times that end up in the build log currently originate in the
status printer, and are propagated back out to the Builder. Move
the edge times into the Builder instead, and move the overall start
time into NinjaMain so it doesn't get reset during manifest
rebuilds.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Revise the logic from commit 2d7f7e55 (Delete read-only files on
Windows, too, 2020-12-07) to check if `GetFileAttributes` or
`DeleteFile` failed due either variant of the file/path-not-found error.
Issue: #1886
|
| | | | | | |
|
| |/ / / /
|/| | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Delete read-only files on Windows, too
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Fixes main complaint of #1886.
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Fixed processor count detection on Windows
|
| | | |
| | | |
| | | |
| | | | |
needed on 32-bit builds (following code review)
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | | |
Co-Authored-By: Takuto Ikuta <atetubou@gmail.com>
|
| | | |
| | | |
| | | |
| | | | |
(i.e. >64 processors) are present
|
|\ \ \ \
| | | | |
| | | | | |
[clang-tidy] add explicit to single argument constructors
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found with google-explicit-constructor
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[clang-tidy] simplify boolean expression
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found with readability-simplify-boolean-expr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add unique IDs to edges
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Edges are nominally ordered by order in the build manifest, but in
fact are ordered by memory address. In most cases the memory address
will be monontonically increasing. Since serialized build output will
need unique IDs, add a monotonically increasing ID to edges, and use
that for sorting instead of memory address.
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found with readability-inconsistent-declaration-parameter-name
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix building on AIX
|
| | | | | | |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The randomly generated command strings are not null-terminated and
implicitly converted to StringPiece objects, which will use strlen to
determine how long the passed `char*` is. Without the null terminator,
this results in undefined behavior and regularly causes crashes on AIX.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found with readability-redundant-string-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Handle process signalling correctly on AIX
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
POSIX shells set the exit code to 128 + the signal number, which
coincidentally matches the layout used by the WIFSIGNALLED/WTERMSIG
macros on most Unix-like systems, but not on AIX. Instead, AIX stores
the signal value in the bottom 8 bits and also bits 16-23. The only time
ninja currently handles signals correctly is when the shell used to call
the program dies via signal.
To handle both scenarios, we detect the shell exit code format and
convert it to the format that the WIFSIGNALED/WTERMSIG macros expect.
Fixes #1623
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Close BuildLog while running generators, fix #1724
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|