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

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 14:36:03 PDT 2021


delcypher added inline comments.


================
Comment at: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:226
+  # CMake cache value.
+  get_filename_component(LLVM_MAIN_SRC_DIR_DEFAULT "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" ABSOLUTE)
+  if (NOT EXISTS "${LLVM_MAIN_SRC_DIR_DEFAULT}")
----------------
mstorsjo wrote:
> Actually, this path doesn't work out correctly if building by targeting `compiler-rt/lib/builtins` directly instead of building the whole compiler-rt. I do both of those configurations - building only builtins at an early stage, and then building the whole later.
Hmm. I didn't test that workflow. I might need to use `CMAKE_CURRENT_LIST_DIR` instead. I'll take a look.


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