summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into clean_dead_outputsJan Niklas Hasse2020-01-0424-310/+868
|\
| * Merge pull request #1534 from mathstuf/remove-depslog-restrictionJan Niklas Hasse2020-01-0410-141/+378
| |\ | | | | | | manifest_parser: remove multi-output depslog restriction
| | * depfile_parser_test: test buggy -MP behaviorBen Boeckel2019-11-203-2/+31
| | | | | | | | | | | | | | | This ensures the current behavior of rejecting this case due to `x` being reused as an input.
| | * depfile_parser: remove restriction on multiple outputsBen Boeckel2019-11-2010-138/+344
| | |
| | * build: add to deps log for each edge outputBen Boeckel2019-11-201-7/+9
| | |
| * | Merge pull request #1685 from jhasse/restatJan Niklas Hasse2020-01-047-24/+197
| |\ \ | | | | | | | | Add restat tool which recalculates all mtimes in the build log
| | * | Ignore nonexistent .ninja_log/.ninja_deps for restat and recompactJan Niklas Hasse2019-12-237-26/+66
| | | |
| | * | Add restat tool which recalculates all mtimes in the build logJan Niklas Hasse2019-12-234-0/+133
| | | |
| * | | Fix logic-error in IsPathDead, see #1432Jan Niklas Hasse2019-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Fix error handling for getcwdAndreas Kempf2019-12-271-2/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | build.cc: constify BuildStatusKonstantin Kharlamov2019-11-202-4/+4
| | | | | | | | | | | | Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * | build.cc: constify a map in BuildStatusKonstantin Kharlamov2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | Modifying a key in C++ associative containers is UB. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * | graph.cc: constify DependencyScanKonstantin Kharlamov2019-11-202-3/+3
| | | | | | | | | | | | Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * | build.cc: constify a few Plan functionsKonstantin Kharlamov2019-11-202-13/+13
| | | | | | | | | | | | Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * | build.cc: constify a map key in RealCommandRunnerKonstantin Kharlamov2019-11-201-3/+3
| |/ | | | | | | | | | | Modifying a key in C++ associative containers is UB. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * Merge pull request #1680 from jonesmz/patch-1Jan Niklas Hasse2019-11-162-2/+2
| |\ | | | | | | Fix invalid preprocessor #if
| | * Update graph_test.ccMichael Jones2019-11-141-1/+1
| | |
| | * Fix invalid preprocessor #ifMichael Jones2019-11-141-1/+1
| | |
| * | Fix minor typo of return valuexianglin10062019-11-151-2/+2
| |/ | | | | Return value of ManifestParser::ParseEdge shoule be boolean
| * Add Bionic tweak for getloadavgjoakim-noah2019-11-091-1/+1
| |
| * Merge pull request #1654 from BourgondAries/masterJan Niklas Hasse2019-10-302-0/+10
| |\ | | | | | | Ensure substring indexing never goes negative
| | * Ensure substring indexing never goes negativeKevin Robert Stravers2019-09-282-0/+10
| | | | | | | | | | | | | | | | | | With widths lower than 4, the ElideMiddle function would crash because its substring access would wrap around and attempt to access the max size_t value. This patch fixes that.
| * | Revert "1492 add column headers to .ninja_log"Jan Niklas Hasse2019-10-282-8/+5
| |/ | | | | | | | | | | This reverts commit cfd0bd3007b291df505f8c45083453310142d681. See #1662.
| * Fix crash when using MSVC in debug modeJan Niklas Hasse2019-09-211-0/+4
| | | | | | | | | | Accessing inputs_[0] when it's empty results in an assert when running in debug. Avoid it by using data() if available.
| * Small constifications (#1647)Konstantin Kharlamov2019-09-195-15/+15
| | | | | | | | | | | | | | * build: constify EdgeWanted() * build: constify a bit of CommandRunner * graph: constify functions of struct Edge Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
| * Enable build on IBM i platform (#1630)ThePrez2019-08-091-1/+5
| | | | | | | | * No perfstat for IBM i (OS400) AIX variant * Allow for future IBM i to identify as 'os400'
| * Merge pull request #1604 from jessemckenna/correct-cpu-count-over-64Jan Niklas Hasse2019-08-081-3/+1
| |\ | | | | | | Enable ninja to use > 64 CPUs on Windows
| | * Make GetProcessorCount() count processors across all processor groupsJesse McKenna2019-07-121-3/+1
| | |
| * | Merge pull request #1513 from nykula/masterJan Niklas Hasse2019-08-061-10/+4
| |\ \ | | | | | | | | Use st_mtim if st_mtime is macro, fix #1510
| | * | Use st_mtim if st_mtime is macro, fix #1510makepost2018-12-241-10/+4
| | | | | | | | | | | | | | | | | | | | In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward compatibility macro. Should help avoid hardcoding platform detection.
| * | | fix building ninja_test on AIX 6.1ky0ko2019-08-051-0/+9
| | | |
| * | | Merge pull request #1508 from mqudsi/colored_failJan Niklas Hasse2019-08-022-2/+8
| |\ \ \ | | | | | | | | | | Emit "FAILED: " in red if terminal supports ANSI color output
| | * | | Add braces to clarify conditional scopeMahmoud Al-Qudsi2019-02-041-2/+3
| | | | |
| | * | | Unset suports_color_ if SetConsoleMode fails on WIN32Mahmoud Al-Qudsi2018-12-101-1/+3
| | | | |
| | * | | Emit "FAILED: " in red if terminal supports ANSI color outputMahmoud Al-Qudsi2018-12-051-1/+4
| | |/ /
| * | | compdb: Dump every rule without any arguments, fix #1377Jan Niklas Hasse2019-08-021-16/+28
| | | |
| * | | Improve const-correctness in compdb related methodsJan Niklas Hasse2019-08-023-21/+16
| | |/ | |/|
| * | Merge pull request #1517 from chagui/1492-add-headers-to-ninja_logJan Niklas Hasse2019-07-022-5/+8
| |\ \ | | | | | | | | #1492 add column headers to .ninja_log
| | * | 1492 add column headers to .ninja_logGuilhem Charles2019-01-132-5/+8
| | |/
| * | Follow GCC/Clang behavior wrt depfilesPeter Wu2019-06-083-46/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option is called "depfile = gcc" and should support depfiles created by GCC. GCC does not escape backslashes and GNU Make does not try to unescape it, so neither should Ninja try to "unescape" it. Only space (' ') and hash sign ('#') are specially treated by GCC/Clang. Note that while tabs are also treated specially by GCC, Clang does not, so do not special case it (why would someone use tabs in a filename?). Support for 2N trailing backslashes in a filename is a bit questionable, but is added to be as consistent as possible with GCC/Clang. See also https://github.com/llvm-mirror/clang/blob/44c160f916a1b080098b17b466b026aa07475ec2/lib/Frontend/DependencyFile.cpp#L316 https://github.com/gcc-mirror/gcc/blob/22a8377023d59cc01ab0a84a1df56d0e1336efa3/libcpp/mkdeps.c#L47 Fixes https://github.com/ninja-build/ninja/issues/1262
| * | Fix UB "member call on null pointer of type 'DepsLog'", see #1248Jan Niklas Hasse2019-05-281-1/+1
| | |
* | | Adding a way to clean dead build artifacts that have an entry in the build log,ikifof2019-05-254-3/+108
|/ / | | | | | | | | | | | | | | | | | | | | | | but are no longer produced by the current manifest. For now adding a dedicated "-t cleandead" option, since it should be run after reading the log; ideally it should be part of the build config and done before to start looking for dirty targets so that an incremental build would produce the same end result as a clean build from scratch. But since I am not 100% sure to understand the comment in the NinjaMain::isPathDead(), I opted to make it a tool for now to avoid impacting users who want to keep those files. The option name "cleandead" was selected insteadof something like "reap" to keep the "clean" prefix.
* | Resurrect the 'rules' tool.Nicolas Despres2019-05-093-0/+71
| | | | | | | | | | | | | | | | | | This tool is useful for writing shell completion script for tools expecting a rule name as argument. The tool was dropped by 34b46f28c. Fix #1024.
* | query: load dyndep files for queried edgesBrad King2019-04-181-0/+7
| |
* | graph: load dyndep filesBrad King2019-04-183-1/+16
| | | | | | | | | | | | Teach the `-t graph` tool to load dyndep files because they are part of the build graph. Issue a warning when the dyndep file cannot be loaded cleanly. This will help users visualize the complete build graph.
* | clean: remove outputs specified by dyndep filesBrad King2019-04-183-0/+73
| | | | | | | | | | | | Some outputs may not be known in the main build manifest and are instead discovered through a dyndep binding. Load dyndep files that are available during cleaning so that we can clean these outputs too.
* | clean: remove unnecessary Cleaner constructor variantBrad King2019-04-183-15/+1
| | | | | | | | | | | | | | | | `Cleaner` provides two constructors that are the same except that one constructs a "real" disk interface internally and the other takes a caller-provided disk interface. A real disk interface is already available at the only call site for the former constructor. Use it directly and drop the unnecessary constructor variant.
* | Teach builder to load dyndep files when they are readyBrad King2019-04-183-7/+908
| | | | | | | | | | | | | | | | After finishing an edge that produces a dyndep file, load the file and update the build graph structure. Recompute the dirty state of all its dependents and of newly reachable portions of the graph. Add edges to the build plan that are discovered to be wanted. Finally, schedule edges that are wanted and now ready to build.
* | Teach RecomputeDirty to load dyndep files that are readyBrad King2019-04-182-0/+219
| | | | | | | | | | | | | | | | | | | | | | The full readiness of a node that has a dyndep binding cannot be known until after the dyndep file is loaded. If a dyndep file is ready while constructing the build plan it can be loaded immediately so full information can be used to decide whether anything needs to be built. If a dyndep file is not ready while constructing the build plan then the edges naming it cannot be ready either because the dyndep file is one of their inputs. In this case we defer loading the dyndep file until the build plan is being executed.
* | Teach DependencyScan to load a dyndep fileBrad King2019-04-185-2/+354
| | | | | | | | | | Add a LoadDyndeps method to load a dyndep file and update the edges that name it in their dyndep binding.