[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 16:12:27 PDT 2021
delcypher added a comment.
@mstorsjo I think I've fixed the patch to support the standalone builtins build. Can you test again?
================
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}")
----------------
delcypher wrote:
> 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.
Damn so `CMAKE_CURRENT_FUNCTION_LIST_DIR` could be used to help us out here but that isn't available until CMake 3.17 and 3.13.4 is the minimum supported version. So I'll have to implement this in a different way.
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