summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1417 from stefanb2/topic-silence-gcc-fallthrough-warningsNico Weber2018-10-244-1/+24
|\ | | | | Silence GCC -Wimplicit-fallthrough warnings
| * Add NINJA_FALLTHROUGH macroStefan Becker2018-04-114-1/+24
| | | | | | | | | | | | | | | | Borrow macro implementation from OpenSSL code. Add the macro after each fallthrough switch case to indicate our intention to the compiler. This silences GCC -Wimplicit-fallthrough warnings, which is implied by GCC 7.x -Wextra.
* | Misc typo fixes by https://github.com/codespell-project/codespell/Mo Zhou2018-09-064-5/+5
|/
* Revert "Fix stat when subdirectory is a file"Fredrik Medley2018-04-092-23/+1
| | | | | This reverts commit 6c864097ef11da366fb4070e6ab9f34d6a293766 and fixes the broken Appveyor builds on GitHub.
* rename a variableNico Weber2018-04-062-10/+10
|
* Improve location of error messages around identifiers.Nico Weber2018-04-063-9/+27
| | | | | | | | | | Lexer::ReadIdent() now sets last_token_ before returning, like Lexer::ReadEvalString() does. So all "expected identifiers" and things that call ReadIdent (pool parser, rule parser, let parser, code parsing the rule name after a : in a build line) now point the "^ near here" at what was there instead of the previous last_token According to manifest_parser_perftest, this is perf-neutral.
* make `-w dupbuild` default to `err`Nico Weber2018-04-051-0/+1
| | | | | | | | | You can still opt out of this by passing `-w dupbuild=warn`. But if you're getting this diagnostic, your build files are incorrect and you should ideally just fix them. This is step 3 on https://github.com/ninja-build/ninja/issues/931 I sent an RfC to ninja-build a few months ago; nobody objected.
* Merge pull request #1348 from ngg/winunicodeNico Weber2018-04-057-26/+22
|\ | | | | Fix building on Windows in UNICODE mode
| * Fix building on Windows in UNICODE modeGergely Nagy2017-10-317-26/+22
| |
* | Merge pull request #1223 from asankah/masterNico Weber2018-04-051-2/+60
|\ \ | | | | | | [compdb] Expand response files inline based on a switch.
| * | [compdb] Move declarations closer to their use.Asanka Herath2018-04-051-3/+3
| | |
| * | [compdb] Expand response files inline based on a switch.Asanka Herath2018-04-051-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | References to response files in a clang compile_commands.json file can be tricky to deal with when tooling expects all the command flags to be present in the 'command' field. This change introduces a '-x' option to '-t compdb' that will expand @rspfile style response file invocations inline. E.g. ```sh $ ninja -t compdb cc [ { "directory": "/src/foo", "command": "cc -foo -bar @foo.obj.rsp", "file": "foo.cc" } ] $ ninja -t compdb -x cc [ { "directory": "/src/foo", "command": "cc -foo -bar foo.cc", "file": "foo.cc" } ] ```
* | | Fix confusing smart console output from concurrent buildsNico Weber2018-04-052-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developers tend to blame the last printed line when a build takes too long. Unfortunately, when building concurrently, the last printed line may have actually finished a long time ago. Under the current system, ninja does not update the status line to reflect what jobs are still running. This change makes ninja always print the oldest still running job instead. In other words, the likely build bottlenecks. Patch from David Zarzycki, originally uploaded at #1320.
* | | Merge pull request #1294 from bradking/plan-track-schedulingNico Weber2018-04-052-26/+40
|\ \ \ | | | | | | | | Track in Plan whether wanted edges have been scheduled
| * | | Track in Plan whether wanted edges have been scheduledBrad King2017-09-142-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the `want_` map to track for wanted edges whether they have been scheduled or not. This gives `ScheduleWork` a direct place to keep this information, making the logic more robust and easier to follow. It also future-proofs `ScheduleWork` to avoid repeat scheduling if it is called after an edge has been removed from `ready_` by `FindWork`.
* | | | make ninja build with -std=c++17Nico Weber2018-04-052-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Ninja is supposed to be able to build as C++98 so it can run on old systems, but it should also be possible to optionally build it with newer dialects.
* | | | Merge pull request #1361 from ppluciennik/ppluciennik/flush_logNico Weber2018-04-051-0/+3
|\ \ \ \ | | | | | | | | | | Flush changes into .ninja_log right away.
| * | | | Flush changes into .ninja_log right away.Pawel Pluciennik2017-11-241-0/+3
| | |_|/ | |/| |
* | | | Merge pull request #1365 from moroten/fix-disk-interface-tests-64-bit-timestampNico Weber2018-04-052-2/+43
|\ \ \ \ | |_|_|/ |/| | | Fix disk_interface_test.cc on Windows for 64-bit timestamp
| * | | Fix stat when subdirectory is a fileFredrik Medley2017-12-192-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | Make sure that stat on Windows, both with and without cache, returns "missing file" when running stat on notadir/foo where notadir is a file.
| * | | Fix disk_interface_test.cc on Windows for 64-bit timestampFredrik Medley2017-12-192-1/+20
| |/ / | | | | | | | | | | | | subdir/subsubdir/.. seems to get the time of subdir/subsubdir on NTFS (Windows 7), not the time of subdir.
* | | Canonicalize targets of clean command.Frank Henigman2018-04-051-8/+15
| | | | | | | | | | | | | | | | | | This corrects an inconsistency where build targets were canonicalized but clean targets were not. For example you could build ./foo but not clean ./foo.
* | | Merge pull request #1386 from jmgao/exitNico Weber2018-04-051-14/+16
|\ \ \ | | | | | | | | Don't clean up after ourselves when exiting.
| * | | Don't clean up after ourselves when exiting.Josh Gao2018-02-191-14/+16
| |/ / | | | | | | | | | | | | | | | Destruction of NinjaMain can be an expensive operation when dealing with stupidly large ninjafiles. exit directly instead of returning out of real_main to avoid doing so.
* | | Merge pull request #1392 from alekseyshl/masterNico Weber2018-04-051-1/+2
|\ \ \ | | | | | | | | Fix build on Solaris.
| * | | Fix build on Solaris.alekseyshl2018-03-051-1/+2
| |/ / | | | | | | | | | Solaris also does not define struct stat's st_mtimensec field.
* | | Merge pull request #1373 from BillyDonahue/help_k_zeroNico Weber2018-04-051-1/+1
|\ \ \ | | | | | | | | Update Usage to show "-k 0" behavior
| * | | Update Usage to show "-k 0" behaviorBilly Donahue2018-01-121-1/+1
| |/ / | | | | | | For "-k N", N==0 is interpreted as infinite. It's useful but not documented in the help, unfortunately.
* | | Add 'output' field to compdb outputScott Graham2018-02-071-0/+2
|/ /
* | Merge pull request #1219 from QuLogic/resolutionNico Weber2017-10-208-25/+60
|\ \ | | | | | | Use high-resolution timestamps
| * | Fix minor typo.Elliott Sales de Andrade2017-09-161-1/+1
| | |
| * | Use strtoll when reading mtime from build log.Elliott Sales de Andrade2017-09-161-1/+1
| | | | | | | | | | | | This prevents overflow on Windows where 'long' is not 64-bit.
| * | Fix some Windows troubles.Elliott Sales de Andrade2017-09-162-1/+8
| | | | | | | | | | | | | | | Add parentheses so that constant does not overflow; include inttypes.h when using MinGW to get the proper macros.
| * | Update checks for new stat fields.Elliott Sales de Andrade2017-09-161-4/+6
| | | | | | | | | | | | | | | This uses the macros as defined by the man page, which, as noted in the comments, are defined correctly on as many libc's that I could check.
| * | Use 64-bit-alignment-safe timestamp reading.Elliott Sales de Andrade2017-09-162-4/+11
| | | | | | | | | | | | | | | Read and write the timestamp as two separate 32-bit integers in a fixed order to prevent any issues with alignment or byte order.
| * | Add #define to get printf-format specifiers.Elliott Sales de Andrade2017-09-161-0/+3
| | | | | | | | | | | | | | | This is needed on older compilers/stdlibs such as on Ubuntu Precise which is used on Travis.
| * | Move #include for type definition to correct place.Elliott Sales de Andrade2017-09-162-1/+6
| | | | | | | | | | | | | | | Not sure why the old way works in newer compilers; maybe they just pre-define these types by defaulting to a newer standard.
| * | Read file timestamps in higher resolution.Elliott Sales de Andrade2017-09-161-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | This uses nanoseconds on POSIX (±~292 years) and 100-ns increments on Windows (±~29247 years). The fallbacks to different structure fields is the only thing grabbed from #337, with a slight modification in implementation.
| * | Make TimeStamp 64-bit.Elliott Sales de Andrade2017-09-168-19/+21
| |/ | | | | | | This prepares it for higher-resolution timestamps.
* | Merge pull request #1344 from loganchien/fix-buf-overrunNico Weber2017-10-201-1/+1
|\ \ | | | | | | Fix potential buffer overrun
| * | Fix potential buffer overrunLogan Chien2017-10-161-1/+1
| |/ | | | | | | | | This commit rearranges record size comparison and fread() to make sure fread() only reads the data that can fit into the buffer.
* | escape usage examplesRefael Ackermann2017-10-191-3/+3
|/
* mark this 1.8.2.gitNico Weber2017-09-111-1/+1
|
* Restore tolerance of self-referencing phony build statementsBrad King2017-09-088-3/+111
| | | | | | | | | | | | | | | | | | | | Since commit v1.8.0^2~3^2~1 (Teach RecomputeDirty to detect cycles in the build graph, 2015-11-13) we correctly reject self-referencing phony build statements like build a: phony a as cycles. Unfortunately this breaks support for CMake 2.8.12.x and 3.0.x because those versions incorrectly produce edges of this form (that we used to tolerate). In order to preserve compatibility with those CMake versions we need to restore tolerance of these edges. Add a special case to the manifest parser to filter out self-referencing inputs of phony edges of the form produced by those CMake versions. Warn by default, but add a `-w phonycycle={err,warn}` option to make it an error. Fixes: #1322
* Factor ManifestParser options into a structureBrad King2017-09-078-62/+75
| | | | | | This will allow more options to be added without updating everywhere that constructs a ManifestParser. Also extend the AssertParse function to take the options so tests can control them.
* mark this 1.8.1.gitNico Weber2017-09-061-1/+1
|
* fix normalizer test for _MAX_PATHTakuto Ikuta2017-09-051-28/+25
|
* mark this 1.8.0.gitNico Weber2017-09-041-1/+1
|
* Remove path component limit from input of CanonicalizePath in windowsTakuto Ikuta2017-08-302-59/+50
|
* Merge pull request #1111 from bradking/detect-cycles-earlyNico Weber2017-06-228-166/+175
|\ | | | | Detect build graph cycles as early as possible