summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add test for status suppression under '--quiet'.Eli Ribble2021-05-061-0/+18
| | | | This just tests that the flag works.
* Add jhasse's suggestion to suppress output on '--quiet'.Eli Ribble2021-05-061-1/+1
| | | | | This just ensures that we also don't get the "Entering directory..." message when the new '--quiet' flag is added.
* Update help description for --quietHenner Zeller2021-05-061-1/+1
| | | | Signed-off-by: Henner Zeller <h.zeller@acm.org>
* Add --quiet option that suppresses status updates.Henner Zeller2021-05-063-3/+10
| | | | | | Refined pull request after discussion in #1816 Signed-off-by: Henner Zeller <h.zeller@acm.org>
* Avoid implicit cast LoadStatus -> boolJan Niklas Hasse2021-04-091-3/+2
|
* Fix misleading usage of return type of Open*LogJan Niklas Hasse2021-04-091-4/+4
| | | | | In an earlier version of 791c887e22046e5e7a2d05ecb5ff27701d56895d those functions returned LoadStatus, too, but it was changed back to bool.
* Merge pull request #1944 from EwoutH/patch-1Jan Niklas Hasse2021-03-291-1/+0
|\ | | | | CI: macOS: Unfix Xcode version to use the latest stable one
| * CI: macOS: Unfix Xcode version to use the latest stable oneEwout ter Hoeven2021-03-281-1/+0
|/ | | Removes the selection of a fixed Xcode version added in 242b7dd which assured Xcode version 12.2 was used when the default was still 12.1. The GitHub default is now 12.4 and newer versions will be made the default a few weeks after the stable release. This commit ensures an up to date Xcode version is used in the CI.
* Merge pull request #1937 from bradking/dyndep-out-depfile-inJan Niklas Hasse2021-03-285-5/+86
|\ | | | | dyndep: reconcile dyndep-specified outputs with depfile-specified inputs
| * dyndep: reconcile dyndep-specified outputs with depfile-specified inputsBrad King2021-03-244-5/+55
| | | | | | | | | | | | | | | | | | When a path loaded from a depfile does not have a node, we create a new node with a phony edge producing it. If we later load a dyndep file that specifies the same node as an output of a known edge, we previously failed with a "multiple rules generate ..." error. Instead, since the conflicting edge was internally generated, replace the node's input edge with the now-known real edge that produces it.
| * dyndep: add dedicated test for dyndep-discovered implicit dependenciesBrad King2021-03-241-0/+31
|/ | | | Previously this was covered only as part of more complex tests.
* Merge pull request #1935 from jdrouhard/revert_input_mtimeJan Niklas Hasse2021-03-246-223/+257
|\ | | | | Revert #1753 and add additional tests to expose previously untested behavior
| * Add some regression tests for additional test casesJohn Drouhard2021-03-241-0/+186
| | | | | | | | | | | | | | These expose some behavior related to implicit deps unknown to ninja and timestamps with generating them as part of a rule. See discussions in #1932 and #1933.
| * Revert "Change build log to always log the most recent input mtime"John Drouhard2021-03-246-226/+74
|/ | | | | | | | | | This reverts commit 67fbbeeec91ec171da7d4e297b8f9b319f3424c8. There were a few missing test cases exposed by CMake's test suite that need slight adjustments. Better to revert the original attempt, add the test cases, and then re-land the change with the fixes. Fixes #1932
* Remove `-w dupbuild` from error message and help outputJan Niklas Hasse2021-03-203-10/+7
| | | | This is step 4 on #931.
* Merge pull request #1753 from jdrouhard/log_input_mtimeJan Niklas Hasse2021-03-206-74/+226
|\ | | | | Change build log to always log the most recent input mtime
| * Change build log to always log the most recent input mtimeJohn Drouhard2021-03-166-74/+226
|/ | | | | | | | | | | | | | | | | | | | | | | | If an edge's output files' mtimes are compared to the most recent input's mtime, edges might be calculated as clean even if they are actually dirty. While an edge's command is running its rule to produce its outputs and an input to the edge is updated before the outputs are written to disk, then subsequent runs will think that the outputs are newer than the inputs, even though the inputs have actually been updated and may be different than what were used to produce those outputs. Ninja will now restat all inputs just prior to running an edge's command and remember the most recent input mtime. When the command completes, it will stat any discovered dependencies from dep files (if necessary), recalculate the most recent input mtime, and log it to the build log file. On subsequent runs, ninja will use this value to compare to the edge's most recent input's mtime to determine whether the outputs are dirty. This extends the methodology used by restat rules to work in all cases. Restat rules are still unique in that they will clean the edge's output nodes recursively if the edge's command did not change the output, but in all cases, the mtime recorded in the log file is now the most recent input mtime. See the new tests for more clarification.
* Merge pull request #1907 from aDotInTheVoid/patch-1Jan Niklas Hasse2021-03-051-2/+3
|\ | | | | Clarify purpose for implicit dependencies
| * Clarify purpose for implicit dependenciesNixon Enraght-Moony2021-01-291-2/+3
| |
* | Merge pull request #1921 from bradking/windows-code-page-utf8Jan Niklas Hasse2021-03-042-10/+13
|\ \ | | | | | | wincodepage: minimize to indicate UTF-8 or not
| * | wincodepage: minimize to indicate UTF-8 or notBrad King2021-03-012-10/+13
|/ / | | | | | | | | | | | | | | | | The ANSI code page identifier is more information than generator programs actually need. The encoding of `build.ninja` is always either UTF-8 or the system-wide ANSI code page. Reduce the output to provide no more information than the generator programs need. The Console code page can be obtained in other ways, so drop it.
* | Merge pull request #1918 from bradking/windows-code-pageJan Niklas Hasse2021-02-262-2/+31
|\ \ | | | | | | Add tool to print code page information on Windows
| * | Add tool to print code page information on WindowsBrad King2021-02-262-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 00459e2b (Use UTF-8 on Windows 10 Version 1903, fix #1195, 2021-02-17), `ninja` does not always expect `build.ninja` to be encoded in the system's ANSI code page. The expected encoding now depends on how `ninja` is built and the version of Windows on which it is running. Add a `-t wincodepage` tool that generators can use to ask `ninja` what encoding it expects. Issue: #1195
| * | doc: fix format of 'missingdeps' documentationBrad King2021-02-261-2/+2
|/ / | | | | | | Group all the paragraphs together in the definition list entry.
* | Merge pull request #1916 from scivision/check_msgJan Niklas Hasse2021-02-231-0/+8
|\ \ | | | | | | cmake: add browse check status
| * | cmake: add browse check statusMichael Hirsch2021-02-231-0/+8
|/ /
* | Merge pull request #1331 from ilor/missingdeps3Jan Niklas Hasse2021-02-239-5/+497
|\ \ | | | | | | missingdeps tool, take 2
| * | missingdeps: use nested maps for edge adjacency cacheTomasz Śniatowski2021-02-222-34/+15
| | | | | | | | | | | | | | | | | | In my tests, nested maps outperform a large map of pairs by 10-20% on a sample Chromium missingdeps run, and are arguably simpler due to fewer ifdefs needed.
| * | missingdeps: add exception for targets that dep on build.ninjaTomasz Śniatowski2021-02-221-0/+8
| | | | | | | | | | | | A "missing dep path" to build.ninja is a false positive, skip reporting it.
| * | Add manual entry about the missingdeps toolTomasz Śniatowski2021-02-221-0/+15
| | |
| * | Add a -t missingdeps tool to detect some classes of build flakesTomasz Śniatowski2021-02-226-1/+478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-233-15/+32
|\ \ \ | | | | | | | | Use UTF-8 on Windows 10 Version 1903, fix #1195
| * | | Use UTF-8 on Windows 10 Version 1903, fix #1195Jan Niklas Hasse2021-02-173-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #1911 from eszlari/cmake-cleanupJan Niklas Hasse2021-02-221-13/+13
|\ \ \ \ | | | | | | | | | | cmake: add_compile_options / PROJECT_SOURCE_DIR
| * | | | cmake: add_compile_options / PROJECT_SOURCE_DIRPeter Eszlari2021-02-091-13/+13
| | |_|/ | |/| |
* | | | Merge pull request #1899 from colincross/status_for_serializeJan Niklas Hasse2021-02-2211-393/+534
|\ \ \ \ | |_|/ / |/| | | 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-189-327/+429
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1913 from bradking/windows-removeJan Niklas Hasse2021-02-121-8/+15
|\ \ \ \ | |_|_|/ |/| | | Restore toleration of missing to-be-deleted files on Windows
| * | | 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
|/ / /
* | | GitHub Actions: Test both Debug and Release with MSVCJan Niklas Hasse2021-02-121-2/+7
| | |
* | | 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.
* | | Merge pull request #1905 from korli/haikuJan Niklas Hasse2021-01-281-0/+4
|\ \ \ | | | | | | | | Add Haiku support.
| * | | Add Haiku support.Augustin Cavalier2021-01-281-0/+4
|/ / /