0

I want to use the lld linker in my project.

I saw this Question but the solution didn't use apt-get.

I tried:

sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install clang-tools

Nothing worked.

I added to the Cmake -fuse-ld=lld:

set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -fuse-ld=lld")

I have a compilation error:

collect2: fatal error: cannot find 'ld'

Can't find lld:

lld --version
command not found: lld

Edit-1

I am using Ubuntu Ubuntu 18.04.6 LTS on arm architecture

Edit-2

It's not essential to the problem because Ubuntu 18.04 LTS has reached the end of its standard support life but for the sake of good order I will give full details:

arm64 architecture, universe repository is enabled

lior.i
  • 142
  • 1
  • 7
  • You've not provided any OS/release, though you do mention Ubuntu (but not product & release). The `lld` package is available I see for most releases/architectures (*but not all*), but as we don't know yours, we cannot provide much specifics. Have you tried a simple package install? for your *unstated* Ubuntu product/release/architecture? – guiverc Jul 06 '23 at 10:16
  • 1
    Does this answer your question? [How do I enable the "Universe" repository?](https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository) based on `lld | 1:15.0-56~exp2 | lunar/universe | amd64, arm64, armhf, i386, ppc64el, riscv64` & lack of details provided by OP – guiverc Jul 06 '23 at 10:17
  • 2
    [Ubuntu 18.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2023/05/13/extended-security-maintenance-for-ubuntu-18-04-bionic-beaver-begins-31-may-2023/) thus is now off-topic here unless your question is specific to helping you move to a *fully supported* release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com//blog/18-04-end-of-standard-support – guiverc Jul 06 '23 at 10:30
  • 1
    Its always helpful if you're specific with details; if you look back at the package details I provided of it existing for *lunar* you'll note its available for multiple ARM architectures... but you don't mention which only its ARM? Either way you're off-topic with this question given you're using an EOSS release, with only 20.04, 22.04, 22.10 & 23.04 now in *standard* Support & thus on-topic on this site. – guiverc Jul 06 '23 at 10:32
  • @guiverc, Thank you so much for the information, I was surprised to know that `Ubuntu 18.04 LTS has reached the end of its standard support life` so sadly I will have to wait with the `lld` linker until we will update our system, this is one more reason to do it. – lior.i Jul 10 '23 at 07:01
  • 1
    18.04 tells you it was the 2018-April release from the *year.month* format used for Ubuntu releases (2000 being subtracted from the *year*), thus adding 5 years of *standard* support isn't hard to work out in future. Warnings of the approaching EOSS also go out six weeks before EOSS (or EOL when its that) so watching for notices shouldn't be hard to detect either. – guiverc Jul 10 '23 at 07:09

0 Answers0