diff options
author | Martin Storsjö <martin@martin.st> | 2021-09-13 22:27:44 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-09-14 11:04:25 +0300 |
commit | 5b007f2c94667b360fcf2009952cd227945ab9e5 (patch) | |
tree | 347e7358c104dcab2ab73e39add0e608b0ee5a4c /runtimes | |
parent | 61f22f70caf80a44d2528e82e5511d5413b8cf70 (diff) |
[runtimes] Calculate the path to the llvm directory without the LLVM cmake package
If building by pointing cmake directly at the llvm-project/runtimes
directory, the llvm cmake package files (that provide e.g.
LLVM_BUILD_MAIN_SRC_DIR) aren't necessarily available. Instead just
use a path relative to the current source dir.
Differential Revision: https://reviews.llvm.org/D109717
Diffstat (limited to 'runtimes')
-rw-r--r-- | runtimes/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 350c9c1ba6a4..16953e8f95cb 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -75,11 +75,11 @@ set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR}) set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR}) # This variable makes sure that e.g. llvm-lit is found. -set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) +set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../llvm) set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) # This variable is used by individual runtimes to locate LLVM files. -set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR}) +set(LLVM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../llvm) if(APPLE) set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "") |