invalid linker name in argument '-fuse-ld=lld'?

Viewed 3663

I am trying to build a project that uses lld and I get the following error:

invalid linker name in argument '-fuse-ld=lld'

I have already installed llvm with "brew install llvm" it is still not working.

1 Answers

brew install llvm should works, but you need use brew info llvm to check the default install path firstly (it usually is /usr/local/opt/llvm).

So, if you need to have llvm first in your PATH, run:

echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc

Then all the build works.

Related