[llvm-bugs] [Bug 42806] New: Creating a dep file

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 29 02:28:00 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42806

            Bug ID: 42806
           Summary: Creating a dep file
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: ruiu at google.com
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

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's no corresponding feature in the linker. Maybe that feature is useful
for the linker.

Usually, programmers pass all object files to a linker, so they write a
Makefile (or an equivalent) as such. However, there are more files that are
linked to a final executable. One example is library files in the system
directory. If they are updated, and if you statically-link everything, it is (I
think) a valid claim that a previously-generated executable is now stale. So is
true for libraries for sanitizers -- if you replace `libasan` for example, your
executable becomes stale, but that dependency is not usually expressed in a
Makefile, as you usually only have to pass `-fsanitize` to the compiler.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190729/d7edbbb9/attachment.html>


More information about the llvm-bugs mailing list