[Openmp-commits] [PATCH] D101509: An attempt to abandon omptarget out-of-tree builds.
Vyacheslav Zakharin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 17 12:02:45 PDT 2021
vzakhari added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt:27
+ # Builds that use pre-installed LLVM have LLVM_DIR set.
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
----------------
tianshilei1992 wrote:
> This line of code is problematic. If I build OpenMP standalone and set `CMAKE_C_COMPILER` to the right `clang`, and the right `clang` is not in `$PATH`, it still finds the one in `$PATH`.
I am not sure I understand the problem. These `find_program` invocations explicitly look the tools (including `clang`) in `${LLVM_TOOLS_BINARY_DIR}`, which is supposed to be set up by `find_package` (which also sets `LLVM_DIR` the causes cmake to hit this clause). Is it the case that in your build you get valid `LLVM_DIR` and invalid `LLVM_TOOLS_BINARY_DIR`? Is it possible that your pre-installed LLVM package is corrupted?
Can you please insert `libomptarget_say("Using: ${LLVM_DIR}; using ${LLVM_TOOLS_BINARY_DIR}")` here and tell me what it is printing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101509/new/
https://reviews.llvm.org/D101509
More information about the Openmp-commits
mailing list