[all-commits] [llvm/llvm-project] 81eeab: [ELF] Add --dependency-file option
Petr Hosek via All-commits
all-commits at lists.llvm.org
Mon Aug 3 16:59:38 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 81eeabbd97f32f7cd7dbe403e2b15db6fd23ad81
https://github.com/llvm/llvm-project/commit/81eeabbd97f32f7cd7dbe403e2b15db6fd23ad81
Author: Petr Hosek <phosek at google.com>
Date: 2020-08-03 (Mon, 03 Aug 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