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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to