[PATCH] D65430: Add `--write-dependencies` option, which is equivalent to compiler option -MD.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 21:09:06 PDT 2019
ruiu created this revision.
ruiu added reviewers: grimar, MaskRay, pcc, peter.smith.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
ruiu edited the summary of this revision.
Clang and GCC have a feature (`-MD` flag) to create a dependency file
in a format that `make` command can read, so that you don't have to
manually maintain dependencies between .c files and .h files.
There was no corresponding feature in the linker. With this patch, you
can now do the same thing by passing `--write-dependencies=<path>` to lld.
I believe this option is worth adding.
This is an example of a generated file:
https://gist.github.com/rui314/f5e2c669c70bec31f260bfd4b8ef41a6
Fixes https://bugs.llvm.org/show_bug.cgi?id=42806.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D65430
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/InputFiles.cpp
lld/ELF/Options.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65430.212268.patch
Type: text/x-patch
Size: 4466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190730/4dd62233/attachment.bin>
More information about the llvm-commits
mailing list