[libcxx-commits] [PATCH] D107895: [runtimes] Set more paths when building runtimes standalone

Jon Chesterfield via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 8 16:24:34 PDT 2021


JonChesterfield added a comment.

Building openmp via `LLVM_ENABLE_RUNTIMES="openmp"` broke with this change. I think in two independent ways. Example failure from the nvptx offloading buildbot http://meinersbur.de:8011/#/builders/117/builds/682

  [stdout] /$HOME/openmp-offload-cuda-runtime/llvm.src/llvm/include/llvm/Support/Compiler.h:18:10: fatal error: 'llvm/Config/llvm-config.h' file not found
  [stdout] #include "llvm/Config/llvm-config.h"

It looks like elf_common.cpp is including files from the llvm include tree, but should be including them from the build (maybe install) tree. The include path is set to $HOME/llvm-project/llvm/include;$HOME/llvm-build/llvm/include by LibomptargetGetDependencies.cmake, based on `${LLVM_MAIN_INCLUDE_DIR} ${LLVM_BINARY_DIR}/include`. 
I'm not confident that LLVM_MAIN_INCLUDE_DIR is a good thing to be passing as an include path, so might be able to fix it by changing that, but the interaction with this patch is unclear.

Also, the amdgpu devicertl now fails to build - LLVM_DIR is set, so it uses `find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)`, which resolves to CLANG_TOOL_NOTFOUND. At a guess LLVM_TOOLS_BINARY_DIR used to resolve to a path with clang on it. Unfortunately it fails to handle this gracefully, we're missing a test for clang == clang_tool_notfound or similar, but fixing that will still leave the devicertl library no longer compiling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107895/new/

https://reviews.llvm.org/D107895



More information about the libcxx-commits mailing list