[PATCH] D99621: [CMake][Compiler-rt] Make it possible to configure standalone compiler-rt without `LLVMConfig.cmake`.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 16:31:20 PDT 2021


delcypher marked an inline comment as done.
delcypher added a comment.

In D99621#2660131 <https://reviews.llvm.org/D99621#2660131>, @vitalybuka wrote:

> On Linux "CC=gcc CXX=g++ cmake -G Ninja -DCOMPILER_RT_INCLUDE_TESTS=ON ../../llvm-project/compiler-rt" works for me without the patch

@vitalybuka I suspect CMake is finding a copy of `llvm-config` to use and that the path printed out by `llvm-config --cmake-dir` points into a directory that has usable CMake files generated by an LLVM build. This patch is trying to address the case when those CMake files from an LLVM build are not available (i.e. the toolchain doesn't ship them).

If you invoke CMake with `-DLLVM_CONFIG_PATH=/path/to/llvm-config` where `/path/to/llvm-config` points to a directory that doesn't exist then you should run into the problem that this patch is trying to resolve. You can likely simulate that by temporarily renaming the `lib/cmake` directory in the root of an LLVM build directory and using the llvm-config binary in `bin/` in the root of an LLVM build tree for the standalone compiler-rt configure.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99621



More information about the llvm-commits mailing list