Why isn't brew symbolically linking lld into /usr/local/bin when it installs llvm?

You can easily find out an answer to your question with the command brew info llvm, which will show this:

llvm is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.

If you need to have llvm first in your PATH, run: echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc

For compilers to find llvm you may need to set: export LDFLAGS="-L/usr/local/opt/llvm/lib" export CPPFLAGS="-I/usr/local/opt/llvm/include"

Supposing you already use CMake, then to add linking info to your CMakeLists.txt file may be accomplished as described in following:

1 question.

2 CMake documentation.

3 helpful introductory notes.