When trying to build a project clang tries to execute /nix/store/…-clang-9.0.1/bin/llvm-link, but llvm-link is only available in the llvm/bin dictionary.
This seems to be a problem with the clang binary, because this also happens when calling the unwrapped clang library directly. Any ideas how I can get clang to use the correct path for llvm-link?
In case anyone has the same problem (most likely not using nix), The problem is no fixed in clang >=10 and the patch will be applied in nixpkgs (https://github.com/NixOS/nixpkgs/pull/78308). Another simple fix is to just create a derivation and symlink the missing binaries (needed: llvm-link, lld, llc, opt, maybe also clang-offload-bundler for clang >7).