- User Since
- Jan 15 2020, 2:28 AM (79 w, 4 d)
Jan 21 2020
@hans: I would leave the decision to cherry-pick this into the 10 release to you. I think the change is nice to have, but once you know the problem, there exists an easy workaround (like symlinking the executables to the right directory).
Jan 17 2020
If @yaxunl has no objections, could someone merge this as I don't have commit access?
Also do we want to also apply this to older versions, since the change is trivial? I confirmed the same problem is in clang 8, 9 and 10 and am certain it is in clang 7, although I didn't test it, because I don't have appropriate device-libs at hand.
Adding the paths for llvm/lld is not needed, because GetProgramPath is actually also searching in $PATH. This means D72903 already is enough to fix my problem.
This patch now only adds the executable dirs to the program path, the code to search them is now in D72903.
Jan 16 2020
The build doesn't fail anymore if lld is not present, also one can set LLD_BINARY_DIR manually. I also exchanged TOOLS_BINARY_DIR with LLVM_TOOLS_BINARY_DIR, since it is better readable and if compiled with llvm this is necessary to populate the variable (although the path is already present in that case, because clang and all the other utils should be in the same directory.
My motivation is the nix-package manager, which has llvm, lld and clang in different packages (which results in different directories).