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

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 15:03:25 PDT 2021


delcypher added a comment.

In D99620#2659855 <https://reviews.llvm.org/D99620#2659855>, @phosek wrote:

> 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.

Thanks. I wasn't aware of what the other runtimes did. Given that let's make not using `llvm-config` the default. I would prefer to be cautious here though so I'll make the old behavior a fallback with a deprecation warning.


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