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
lldpackage 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:16lld | 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:17Ubuntu 18.04 LTS has reached the end of its standard support lifeso sadly I will have to wait with thelldlinker until we will update our system, this is one more reason to do it. – lior.i Jul 10 '23 at 07:01