[all-commits] [llvm/llvm-project] b4c765: [ELF] Add --dependency-file option
Petr Hosek via All-commits
all-commits at lists.llvm.org
Thu Jul 30 12:56:42 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b4c7657ba602acde1c2ea5391c973949b9c3ce09
https://github.com/llvm/llvm-project/commit/b4c7657ba602acde1c2ea5391c973949b9c3ce09
Author: Petr Hosek <phosek at google.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M lld/ELF/Config.h
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/Options.td
A lld/test/ELF/dependency-file.s
Log Message:
-----------
[ELF] Add --dependency-file option
Clang and GCC have a feature (-MD flag) to create a dependency file
in a format that build systems such as Make or Ninja can read, which
specifies all the additional inputs such .h files.
This change introduces the same functionality to lld bringing it to
feature parity with ld and gold which gained this feature recently.
See https://sourceware.org/bugzilla/show_bug.cgi?id=22843 for more
details and discussion.
The implementation corresponds to -MD -MP compiler flag where the
generated dependency file also includes phony targets which works
around the errors where the dependency is removed. This matches the
format used by ld and gold.
Fixes PR42806
Differential Revision: https://reviews.llvm.org/D82437
More information about the All-commits
mailing list