[all-commits] [llvm/llvm-project] aad5c2: [cmake] Honor CMAKE_VERBOSE_MAKEFILE when building...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Sun Dec 17 13:43:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aad5c2f887d3cd1c69f798186e6502f0ed6e3dde
https://github.com/llvm/llvm-project/commit/aad5c2f887d3cd1c69f798186e6502f0ed6e3dde
Author: Dimitry Andric <dimitry at andric.com>
Date: 2023-12-17 (Sun, 17 Dec 2023)
Changed paths:
M compiler-rt/cmake/Modules/AddCompilerRT.cmake
M llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Log Message:
-----------
[cmake] Honor CMAKE_VERBOSE_MAKEFILE when building external projects (#75749)
When the top-level CMake invocation has `CMAKE_VERBOSE_MAKEFILE=ON`,
indicating the user wants to have verbose builds (i.e. all executed
commands explicitly echoed), some of the subprojects and runtimes (such
as compiler-rt, libcxx, etc) do not build in verbose mode. For example,
with Ninja:
```
[ 99% 6252/6308] cd /build/runtimes/builtins-bins && /usr/local/bin/cmake --build .
[ 0% 6/308] Building C object CMakeFiles/clang_rt.builtins-i386.dir/absvti2.c.o
[ 0% 7/308] Building C object CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o
[ 0% 8/308] Building C object CMakeFiles/clang_rt.builtins-i386.dir/absvsi2.c.o
...
```
This is because `llvm_ExternalProject_Add()` and `add_custom_libcxx()`
use CMake's `ExternalProject_Add()` function to configure such
subproject builds, and do not pass through the `CMAKE_VERBOSE_MAKEFILE`
setting.
Similar to what is done in `clang/CMakeLists.txt`, add
`-DCMAKE_VERBOSE_MAKEFILE=ON` to the `ExternalProject_Add()` invocations
in `llvm_ExternalProject_Add()` and `add_custom_libcxx()`, whenever the
top-level CMake invocation had `CMAKE_VERBOSE_MAKEFILE` turned on.
More information about the All-commits
mailing list