2

I am trying to use LLVM lld linker instead of the GNU ld linker that I was previously using.

ld --version

LLD 8.0.0 (compatible with GNU linkers)

I have some shared libraries placed in /usr/local/lib. I had the path set in ld.so.conf for the GNU ld linker to find the libraries. However, lld ignores ld.so.conf. I also tried to set the LD_LIBRARY_PATH

echo $LD_LIBRARY_PATH

/usr/local/lib

But lld seems to ignore that as well. How can I add /usr/local/lib to the lld linker search path?

compor
  • 2,239
  • 1
  • 19
  • 29
vaibhav kumar
  • 885
  • 1
  • 11
  • 13

1 Answers1

-1

How can I add /usr/local/lib to the lld linker search path?

This should work:

ld -L /usr/local/lib ...

Had the path set in ld.so.conf for the GNU ld linker to find the libraries.

The GNU ld doesn't care about ld.so.conf at all (only ld-linux looks there), but GNU ld does look in /usr/local/lib by default.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362