[all-commits] [llvm/llvm-project] 154db0: [CMake] Avoid `LLVM_BINARY_DIR` when other more sp...
John Ericson via All-commits
all-commits at lists.llvm.org
Wed Sep 14 07:59:33 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 154db06ce0d6c80ec900718b764e56ff90d360a0
https://github.com/llvm/llvm-project/commit/154db06ce0d6c80ec900718b764e56ff90d360a0
Author: John Ericson <John.Ericson at Obsidian.Systems>
Date: 2022-09-14 (Wed, 14 Sep 2022)
Changed paths:
M lldb/test/API/CMakeLists.txt
M llvm/tools/llvm-shlib/CMakeLists.txt
Log Message:
-----------
[CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are better-suited, part 1
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`
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.
There are many more occurrences without `CMAKE_CFG_INTDIR`, but those are left for D132316 as they have proved somewhat tricky to fix.
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/D133828
More information about the All-commits
mailing list