[PATCH] D99620: [CMake][Compiler-rt] Compute LLVM_MAIN_SRC_DIR assuming the monorepo layout.

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


phosek added a comment.

The biggest issue with the current setup is that compiler-rt build relies on various LLVM build artifacts, like using the just built Clang <https://github.com/llvm/llvm-project/blob/a4ee79c8ae5ca1bbfa8d78a2782918d1f23f15b2/compiler-rt/cmake/Modules/AddCompilerRT.cmake#L463> but not in a very disciplined way which requires us to use various workaround like this: https://github.com/llvm/llvm-project/blob/99fd0662278470f5405b8abd79b681b96cac7856/runtimes/CMakeLists.txt#L116 (if you search for `compiler-rt` in that file, you'll see other issues).

I completely agree with @delcypher. Using `find_package(LLVM)` wouldn't really be an improvement. Ideally compiler-rt build would directly use other CMake files from the LLVM source tree, but wouldn't require LLVM build output. If it needs to use any build artifacts from LLVM, those would have be passed explicitly via CMake options (that is, no automatic discovery). In the LLVM runtimes build that would be done automatically.


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