[PATCH] D99620: [CMake][Compiler-rt] Fix `LLVM_MAIN_SRC_DIR` to be correct when `llvm-config` reports a path that doesn't exist.

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 14:45:18 PDT 2021


phosek added a comment.

Other runtimes like libc++, libc++abi and libunwind already assume the monorepo layout and don't rely on `llvm-config`. Removing the `llvm-config` dependency would allow further cleanups in the compiler-rt build so this is a highly desirable change. Given that, I'd actually prefer just making this the default behavior.

If you want to be extra cautious, then maybe we could invert this and try to use `${CMAKE_CURRENT_SOURCE_DIR}/../llvm` by default, and only if it doesn't exist, fallback onto `llvm-config` but print a warning that we're going to remove this behavior soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99620



More information about the llvm-commits mailing list