[llvm-dev] Linker Option support for ELF

Cary Coutant via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 12 17:11:50 PST 2018


> But I'm very much against allowing any sort of option that specifies full
> paths to be embedded, including "-L". Typically, object files are
> location-independent -- if you want to copy them to another system and run
> the linker there (with an appropriate sysroot path), that's going to work
> perfectly fine. But as soon as you start allowing path options to be
> embedded, you're in a whole new world, with a whole new set of possible
> pain. And, AFAICT, other systems do not allow that, either.

While this is true in some development environments, in others, the
ability to embed a path can be very useful. It's common to have
third-party libraries installed in locations that aren't in the
default search path, but installed in the same location on each build
machine.

We already do the same for dynamic linking with RPATH, which reminds
me that we'll probably want to support an "rpath" option as well.

-cary


More information about the llvm-dev mailing list