summaryrefslogtreecommitdiff
path: root/runtimes
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-01-01 07:03:31 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-01-03 20:55:44 +0000
commit949bbd0a689286d0b2f73ae4f212673bc0bd688c (patch)
tree609d46731002d72390060a9e0132e61f0b8de3db /runtimes
parenta361320d75ad51fcca6522dc6caa4673457d6ea7 (diff)
downloadllvm-949bbd0a689286d0b2f73ae4f212673bc0bd688c.tar.gz
[CMake] Use `LLVM_COMMON_CMAKE_UTILS` in runtimes just for clarity
In D116472 we created conditionally defined variables for the tools to unbreak the legacy build where they are in `llvm/tools`. The runtimes are not tools, so that flexibility doesn't matter. Still, it might be nice to define (unconditionally) and use the variable for the runtimes simply to make the code a bit clearer and document what is going on. Also, consistently put project dirs at the beginning, not end of `CMAKE_MODULE_PATH`. This ensures they will properly shadow similarly named stuff that happens to be later on the path. Reviewed By: mstorsjo, #libunwind, #libc, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D116477
Diffstat (limited to 'runtimes')
-rw-r--r--runtimes/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 8f37d0e59feb..cedce7b3541e 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -28,12 +28,14 @@ endfunction()
find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_package(Clang PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+
# Add path for custom and the LLVM build's modules to the CMake module path.
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
- "${CMAKE_CURRENT_SOURCE_DIR}/../cmake"
- "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules"
+ "${LLVM_COMMON_CMAKE_UTILS}"
+ "${LLVM_COMMON_CMAKE_UTILS}/Modules"
"${CMAKE_CURRENT_SOURCE_DIR}/../llvm/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/../llvm/cmake/modules"
)