[cfe-dev] Unable to use LLD?

Shriramana Sharma via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 14 23:45:25 PDT 2019


Thanks all for your reply.

FWIW I think the current behaviour of automatically choosing the lld
version is correct and simplest and it was I who unneededly
complicated the experience by trying to specify the lld version.

Now I tried installing parallelly both clang+lld 8 and 9 from the
bionic repos, and was pleased to note that by just giving -fuse-ld=lld
clang-8 selects lld-8 and clang-9 selects lld-9. This is the most
natural and expected behaviour and I sincerely request to retain this.
If anyone wants another linker to be used then they should specify
using full path as you have mentioned.

Session transcript:

$ clang-8 -fuse-ld=lld -Wall -Wextra -o hello.8.elf hello.c
$ clang-9 -fuse-ld=lld -Wall -Wextra -o hello.9.elf hello.c
$ alias elfcomment='readelf --string-dump .comment'
$ elfcomment hello.8.elf

String dump of section '.comment':
  [     0]  Linker: LLD 8.0.0
  [    12]  clang version 8.0.0-svn356034-1~exp1~20190313093039.54
(branches/release_80)
  [    5f]  GCC: (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0

$ elfcomment hello.9.elf

String dump of section '.comment':
  [     0]  clang version
9.0.0-svn356096-1~exp1+0~20190313201923.857~1.gbp505100 (trunk)
  [    4e]  Linker: LLD 9.0.0
  [    60]  GCC: (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0

Shriramana Sharma.



More information about the cfe-dev mailing list