More linker modeling
woodruffw opened this issue · 0 comments
woodruffw commented
As part of doing a better job of tracking inputs and outputs, we should model the following in the linker (LD
) and all compiler tools:
-L$path
: prepend$path
to the library search path-l$name
: search for$libname
in the library search path
In particular, it's common for builds to produce intermediate libraries and then link them into their final "leaf" binaries. When this happens, the command line usually looks something like this:
$CC -o foo foo.c -Llocal/path -lutils
In cases like that, we want to opportunistically resolve -lutils
as local/path/libutils.{so,a}
if that path is actually present.