summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Add a -t missingdeps tool to detect some classes of build flakesTomasz Śniatowski2021-02-224-1/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Refactor depfile loading in preparation for the missingdeps toolTomasz Śniatowski2021-02-222-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Extract an usable helper to load depfile dependencies without adding them to the graph.
* | | | | Merge pull request #1915 from jhasse/windows-utf8Jan Niklas Hasse2021-02-231-15/+20
|\ \ \ \ \ | | | | | | | | | | | | Use UTF-8 on Windows 10 Version 1903, fix #1195
| * | | | | Use UTF-8 on Windows 10 Version 1903, fix #1195Jan Niklas Hasse2021-02-171-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge pull request #1899 from colincross/status_for_serializeJan Niklas Hasse2021-02-229-393/+531
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Status changes to support frontends
| * | | | | Put builder output through status interfaceColin Cross2021-02-056-15/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send all output after manifest parsing is finished to the Status interface, so that when status frontends are added they can handle build messages.
| * | | | | Turn BuildStatus into an interfaceColin Cross2020-12-187-327/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make BuildStatus an abstract interface, and move the current implementation to StatusPrinter, to make way for a serialized Status output.
| * | | | | Simplify running edges statusColin Cross2020-12-183-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Move edge time from Status to BuilderColin Cross2020-12-184-98/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | disk_interface: Restore toleration of missing files in RemoveFile on WindowsBrad King2021-02-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | disk_interface: Do not query bits of INVALID_FILE_ATTRIBUTESBrad King2021-02-121-5/+5
| | | | | |
* | | | | | disk_interface: Improve wrapping of comment in RemoveFileBrad King2021-02-121-3/+3
| |/ / / / |/| | | |
* | | | | Merge pull request #1892 from jhasse/windows-readonlyJan Niklas Hasse2021-02-102-2/+25
|\ \ \ \ \ | | | | | | | | | | | | Delete read-only files on Windows, too
| * | | | | Delete read-only files on Windows, tooJan Niklas Hasse2020-12-072-2/+25
| |/ / / / | | | | | | | | | | | | | | | Fixes main complaint of #1886.
* | | | | Add Haiku support.Augustin Cavalier2021-01-281-0/+4
| |_|/ / |/| | |
* | | | Merge pull request #1674 from cameron314/bugfix/core-countJan Niklas Hasse2021-01-011-0/+29
|\ \ \ \ | |/ / / |/| | | Fixed processor count detection on Windows
| * | | Added preprocessor if to clarify processor count workaround code is only ↵Cameron2020-12-311-1/+2
| | | | | | | | | | | | | | | | needed on 32-bit builds (following code review)
| * | | Tweaks following code reviewCameron2020-06-101-4/+3
| | | |
| * | | Style changes following code reviewCameron Desrochers2019-11-201-4/+8
| | | |
| * | | Removed unnecessary #ifdef following code reviewCameron Desrochers2019-11-131-2/+1
| | | |
| * | | Use symbolic constant as suggested in code reviewCameron2019-11-131-1/+1
| | | | | | | | | | | | Co-Authored-By: Takuto Ikuta <atetubou@gmail.com>
| * | | Fixed processor count detection on Windows when multiple processor groups ↵Cameron Desrochers2019-11-121-0/+26
| | | | | | | | | | | | | | | | (i.e. >64 processors) are present
* | | | Merge pull request #1791 from neheb/expJan Niklas Hasse2020-12-062-5/+4
|\ \ \ \ | | | | | | | | | | [clang-tidy] add explicit to single argument constructors
| * | | | [clang-tidy] add explicit to single argument constructorsRosen Penev2020-12-062-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with google-explicit-constructor Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | Merge pull request #1790 from neheb/boolJan Niklas Hasse2020-12-061-4/+1
|\ \ \ \ \ | | | | | | | | | | | | [clang-tidy] simplify boolean expression
| * | | | | [clang-tidy] simplify boolean expressionRosen Penev2020-12-051-4/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Found with readability-simplify-boolean-expr Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | Merge pull request #1866 from jhasse/unique-edge-idsJan Niklas Hasse2020-12-037-23/+34
|\ \ \ \ \ | | | | | | | | | | | | Add unique IDs to edges
| * | | | | Add unique IDs to edgesColin Cross2020-10-307-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | [clang-tidy] fix inconsistent declarationsRosen Penev2020-12-022-7/+7
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Found with readability-inconsistent-declaration-parameter-name Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | Add FreeBSD support to GetProcessorCountMateusz Guzik2020-11-301-1/+12
| | | | |
* | | | | mark this 1.10.2.gitJan Niklas Hasse2020-11-281-1/+1
| | | | |
* | | | | Merge pull request #1879 from kadler/aix-cleanupJan Niklas Hasse2020-11-141-0/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix building on AIX
| * | | | | Use internal getopt for IBM i and AIXKevin Adler2020-11-131-0/+3
| | | | | |
* | | | | | Fix buffer overread in hash_collision_benchmark.ccKevin Adler2020-11-131-1/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | [clang-tidy] remove pointless string initRosen Penev2020-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with readability-redundant-string-init Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | Merge pull request #1868 from kadler/fix-aix-signal-checkingJan Niklas Hasse2020-11-021-0/+10
|\ \ \ \ \ | | | | | | | | | | | | Handle process signalling correctly on AIX
| * | | | | Handle process signalling correctly on AIXKevin Adler2020-10-311-0/+10
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge pull request #1834 from jhasse/close-during-generatorJan Niklas Hasse2020-11-022-2/+5
|\ \ \ \ \ | |/ / / / |/| | | | Close BuildLog while running generators, fix #1724
| * | | | Close BuildLog while running generators, fix #1724Jan Niklas Hasse2020-08-262-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Check return value of setvbuf, fix #509Jan Niklas Hasse2020-10-302-2/+6
| | | | |
* | | | | Comply with project formatting rules wrt 80 column linesMichael Jones2020-09-308-13/+19
| | | | |
* | | | | Remove 'using namespace std' from header files, properly namespace all std ↵Michael Jones2020-09-3026-276/+250
| | | | | | | | | | | | | | | | | | | | symbols
* | | | | Add 'using namespace std;' to all cc files to prepare for removing it from ↵Michael Jones2020-09-3055-1/+109
| | | | | | | | | | | | | | | | | | | | header files
* | | | | Merge pull request #1789 from neheb/ifJan Niklas Hasse2020-09-101-2/+1
|\ \ \ \ \ | | | | | | | | | | | | [clang-tidy] fix small false positive
| * | | | | [clang-tidy] fix small false positiveRosen Penev2020-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | else if has to be on the same line it seems. Found with readability-misleading-indentation Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | | Merge pull request #1786 from neheb/membJan Niklas Hasse2020-09-102-8/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | [clang-tidy] remove redundant member init
| * | | | | | [clang-tidy] remove redundant member initRosen Penev2020-06-182-8/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with readability-redundant-member-init Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | | | | | Improve error handling in inline.shAlastair Harrison2020-08-281-3/+10
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Mark this 1.10.1.gitJan Niklas Hasse2020-08-181-1/+1
| | | | |
* | | | | Merge pull request #1780 from jhasse/delay-openJan Niklas Hasse2020-08-034-47/+89
|\ \ \ \ \ | | | | | | | | | | | | Delay actually opening log files until the first write, fix #1724