[libcxx-commits] [PATCH] D107895: [runtimes] Set more paths when building runtimes standalone
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 9 05:33:55 PDT 2021
mstorsjo added a comment.
I was able to easily reproduce the breakage and understood the misunderstanding; when building runtimes as part of the main llvm build, by setting `LLVM_ENABLE_RUNTIMES`, it does a separate sub-invocation of cmake pointing at the llvm-project/runtimes directory, which the `if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)` condition considered the same as if building entirely standalone, by pointing cmake at the llvm-project/runtimes directory manually. Instead check if `LLVM_BINARY_DIR` was set (if invoked by the main LLVM build, this parameter is explicitly passed from there) and if `find_package(LLVM)` succeeded (which sets `LLVM_TOOLS_BINARY_DIR` and `LLVM_LIBRARY_DIR`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107895/new/
https://reviews.llvm.org/D107895
More information about the libcxx-commits
mailing list