[PATCH] D72903: [HIP] use GetProgramPath for executable discovery

2020-01-21 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte added a comment. Thanks @tra! @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).

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-15 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte created this revision. DieGoldeneEnte added a reviewer: yaxunl. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. The previous code constructed the executable paths for llvm-link, opt, lld, llc and clang-offload-bundler for the path to the compiler.

[PATCH] D72903: [HIP] use GetProgramPath for executable discovery

2020-01-17 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte added a comment. 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,

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-17 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte abandoned this revision. DieGoldeneEnte added a comment. 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. CHANGES SINCE LAST ACTION

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-16 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte added a comment. In D72806#1824560 , @yaxunl wrote: > What's the use case of this change? > > Normally clang needs to call opt/llc/lld from the same directory of clang. > Why do we need to find them in other directories? My motivation is

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-16 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte added a comment. In D72806#1825362 , @tra wrote: > In D72806#1825333 , @DieGoldeneEnte > wrote: > > > In D72806#1824560 , @yaxunl wrote: > > > > > What's the

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-16 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte updated this revision to Diff 238645. DieGoldeneEnte added a comment. 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

[PATCH] D72903: [HIP] use GetProgramPath for executable discovery

2020-01-17 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte created this revision. DieGoldeneEnte added reviewers: yaxunl, tra. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change replaces the manual building of executable paths using llvm::sys::path::append with GetProgramPath. This enables adding other

[PATCH] D72806: [HIP] fix paths for executables not in clang bin directory

2020-01-17 Thread Holger Wünsche via Phabricator via cfe-commits
DieGoldeneEnte updated this revision to Diff 238708. DieGoldeneEnte added a comment. This patch now only adds the executable dirs to the program path, the code to search them is now in D72903 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72806/new/