diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-08-20 18:11:58 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-08-24 10:14:05 -0400 |
commit | ad8c34bc3089d847a09bb740f7a58c96073e0959 (patch) | |
tree | c6f6eb4a8e721925e87a1e6647a9fb3d26d2bf65 /bolt/unittests | |
parent | 8e29f3f1c35a88f00a0290b0280468d04932eeb5 (diff) | |
download | llvm-ad8c34bc3089d847a09bb740f7a58c96073e0959.tar.gz |
[CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are better-suited
A simple sed doing these substitutions:
- `${LLVM_BINARY_DIR}/(\$\{CMAKE_CFG_INTDIR}/)?lib(${LLVM_LIBDIR_SUFFIX})?\>` -> `${LLVM_LIBRARY_DIR}`
- `${LLVM_BINARY_DIR}/(\$\{CMAKE_CFG_INTDIR}/)?bin\>` -> `${LLVM_TOOLS_BINARY_DIR}`
where `\>` means "word boundary".
The only manual modifications were reverting changes in
- `compiler-rt/cmake/Modules/CompilerRTUtils.cmake
- `runtimes/CMakeLists.txt`
because these were "entry points" where we wanted to tread carefully not not introduce a "loop" which would end with an undefined variable being expanded to nothing.
This hopefully increases readability overall, and also decreases the usages of `LLVM_LIBDIR_SUFFIX`, preparing us for D130586.
Reviewed By: sebastian-ne
Differential Revision: https://reviews.llvm.org/D132316
Diffstat (limited to 'bolt/unittests')
-rw-r--r-- | bolt/unittests/Core/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bolt/unittests/Core/CMakeLists.txt b/bolt/unittests/Core/CMakeLists.txt index 0e78d0a2746f..9e9c1013b21f 100644 --- a/bolt/unittests/Core/CMakeLists.txt +++ b/bolt/unittests/Core/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(CoreTests if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) include_directories( ${LLVM_MAIN_SRC_DIR}/lib/Target/AArch64 - ${LLVM_BINARY_DIR}/lib/Target/AArch64 + ${LLVM_LIBRARY_DIR}/Target/AArch64 ) target_compile_definitions(CoreTests PRIVATE AARCH64_AVAILABLE) @@ -29,7 +29,7 @@ endif() if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) include_directories( ${LLVM_MAIN_SRC_DIR}/lib/Target/X86 - ${LLVM_BINARY_DIR}/lib/Target/X86 + ${LLVM_LIBRARY_DIR}/Target/X86 ) target_compile_definitions(CoreTests PRIVATE X86_AVAILABLE) |