update the lld linker path for Darwin

Author: dmitrisCreated Jul 25, 2025Updated Jul 25, 2025

Currently the book (zero2prod_20240903.pdf) says on p.6:

# On MacOS, brew install llvm and follow steps in brew info llvm [...] [target.aarch64-apple-darwin] rustflags= ["-C", "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld"]

The same path is in https://github.com/LukeMathWalker/zero-to-production/blob/main/.cargo/config.toml#L14

Since now there is a separate 'lld' formula, need to change to brew install lld and th erustflags to have /opt/homebrew/opt/lld/bin/ld64.lld (or just /opt/homebrew/bin/ld64.lld).

bash
$ ls -l /opt/homebrew/opt/llvm/bin/ld64.lld
ls: /opt/homebrew/opt/llvm/bin/ld64.lld: No such file or directory
$ ls -l /opt/homebrew/opt/lld/bin/ld64.lld
lrwxr-xr-x  1 dmitris  admin  3 Jul  9 01:06 /opt/homebrew/opt/lld/bin/ld64.lld -> lld

Source: LukeMathWalker/zero-to-production