[PATCH] D37954: Expand absolute system header paths when using -MD depfiles
Peter Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 16 20:32:49 PDT 2017
Lekensteyn created this revision.
Herald added a subscriber: klimek.
GCC defaults to expanding the dependencies in depfiles, resolving
components like ".." and symlinks. Mimic this feature to ensure that the
Ninja build tool detects the correct dependencies when a symlink changes
directory levels, see https://github.com/ninja-build/ninja/issues/1330
An option to disable this feature is added in case "these changed header
paths may conflict with some compilation environments", see
https://gcc.gnu.org/ml/gcc-patches/2012-09/msg00287.html
Note that under GCC, this option would also affect the paths shown in
the preprocessed output (-E), but that is not implemented here since I
am not sure if it is useful or breaks something else.
https://reviews.llvm.org/D37954
Files:
include/clang/Driver/Options.td
include/clang/Frontend/DependencyOutputOptions.h
lib/Driver/Job.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/DependencyFile.cpp
lib/Tooling/ArgumentsAdjusters.cpp
test/Preprocessor/dependencies-realpath.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37954.115552.patch
Type: text/x-patch
Size: 6575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170917/7b6fa905/attachment.bin>
More information about the cfe-commits
mailing list