commit | fba5ce07367ce63ade61a560feed36ea9d315b0f | [log] [tgz] |
---|---|---|
author | Peter Wu <peter@lekensteyn.nl> | Fri Oct 06 20:08:51 2017 +0200 |
committer | Peter Wu <peter@lekensteyn.nl> | Fri Jun 07 22:49:52 2019 -0700 |
tree | f90b0347e6019f5b9adf06c7e9136e073b88df8b | |
parent | 28a7d1491367de7b39c854d166114f76d272f04f [diff] |
Follow GCC/Clang behavior wrt depfiles 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