[all-commits] [llvm/llvm-project] e62a00: [cmake] Honor CMAKE_VERBOSE_MAKEFILE when building...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Sun Dec 17 12:29:08 PST 2023
Branch: refs/heads/users/DimitryAndric/honor-cmake-verbose
Home: https://github.com/llvm/llvm-project
Commit: e62a008502e8aa59c83876cc4d657efbc4c747ef
https://github.com/llvm/llvm-project/commit/e62a008502e8aa59c83876cc4d657efbc4c747ef
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
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