| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously stdout buffering was disabled in the LinePrinter constructor.
This worked for a long time but ultimately this side-effect caused a
performance bug (issue #2018) in tools such as -t deps. Moving the
disabling of buffering into real_main and only disabling buffering
when a tool is not used makes the desired semantics clearer and restores
the lost performance.
This fixes issue #2018. It has been tested and a 10x speedup was seen
relative to the tip-of-tree version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
header files
|
|\
| |
| | |
Emit "FAILED: " in red if terminal supports ANSI color output
|
| | |
|
|/
|
| |
Add reading of TERM variable for win32 dumb terminals
|
| |
|
|
|
|
|
| |
Don't strip colors when CLICOLOR_FORCE is set to a non-zero value. This
environment variable is also used by CMake's Make back-end.
|
|\
| |
| | |
Query terminal width from STDOUT_FILENO
|
| |
| |
| |
| |
| | |
Rather than 0 (stdin). So it will work even if ninja's stdin isn't connected to
the terminal for whatever reason.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
The original overprinting code, added in 7b3d8c8e, used printf for printing
the status. printf needs one column for the cursor, so the status message
could only take up `width - 1` columns. fc554c22 changed Windows from printf
to WriteConsoleOutput which doesn't move the cursor, so keeping one column
empty is no longer needed. So stop doing that.
Also remove a duplicate call to GetConsoleScreenBufferInfo.
|
|
|
|
| |
No behavior change. Based on a patch from gmisocpp@gmail.com!
|
|
|
|
|
|
|
|
|
|
|
|
| |
In cmd.exe, hitting the "Pause" key or Ctrl-S will pause
programs until a key is pressed. This is apparently
implemented when stdout is writing to, so use printf
instead of Console functions to reset the cursor to
the start of the line. Also happens to simplify the code.
(This already worked in -v mode since that already
prints using printf.)
Based on a patch from gmisocpp@gmail.com!
|
|
|
| |
Include POSIX termios.h
|
|
|
|
|
|
|
| |
This is a pre-defined pool with a depth of 1. It has the special property
that any task in the pool has direct access to the console. This can be
useful for interactive tasks or long-running tasks which produce status
updates on the console (such as test suites).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subcommands can write things like UTF-16, which some terminals can
understand. printf() will interpret the null bytes as the end of the
string.
In particular, MSVC's assert() will print wide characters by default,
and I can't find a way to disable it, leading to clang assertion
failures looking like:
FAILED: ...clang.exe ...
Aninja: build stopped: subcommand failed.
With this fix, I get the desired:
FAILED: ...clang.exe ...
Assertion failed: SymbolMap...
ninja: build stopped: subcommand failed.
|
|
|
|
| |
We "using namespace std" anywhere we need a std::string or a std::vector.
|
| |
|
| |
|
| |
|
|
|