[compiler-rt] [llvm] [cmake] Honor CMAKE_VERBOSE_MAKEFILE when building external projects (PR #75749)

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 13:39:28 PST 2023


DimitryAndric wrote:

I got this suggestion from https://discourse.cmake.org/t/no-verbose-output-when-building-an-external-project-with-ninja/1113, where they recommend using `CMAKE_VERBOSE_BUILD` with Ninja. For GNU make it is not necessary since you can pass `VERBOSE=1` as a variable on the command line, and it will automatically be passed down to all sub-makes.

As an example, when I do a top-level configure with `CMake -G Ninja -D CMAKE_VERBOSE_BUILD:BOOL=ON` with this patch, I now get (for the builtins lib, for example):

```
-- Build files have been written to: /build/runtimes/builtins-bins
[ 30% 4/10] cd /build/runtimes/builtins-bins && /usr/local/bin/cmake --build .
Change Dir: '/build/runtimes/builtins-bins'

Run Build Command(s): /usr/local/bin/ninja -v
[  3% 6/29] /build/./bin/clang --target=x86_64-unknown-freebsd15.0 -DVISIBILITY_HIDDEN  -O3 -DNDEBUG -m32 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT CMakeFiles/clang_rt.builtins-i386.dir/mulosi4.c.o -MF CMakeFiles/clang_rt.builtins-i386.dir/mulosi4.c.o.d -o CMakeFiles/clang_rt.builtins-i386.dir/mulosi4.c.o -c /share/dim/src/llvm/llvm-project/compiler-rt/lib/builtins/mulosi4.c
[  6% 7/29] /build/./bin/clang --target=x86_64-unknown-freebsd15.0 -DVISIBILITY_HIDDEN  -O3 -DNDEBUG -m32 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT CMakeFiles/clang_rt.builtins-i386.dir/muldc3.c.o -MF CMakeFiles/clang_rt.builtins-i386.dir/muldc3.c.o.d -o CMakeFiles/clang_rt.builtins-i386.dir/muldc3.c.o -c /share/dim/src/llvm/llvm-project/compiler-rt/lib/builtins/muldc3.c
...
```


https://github.com/llvm/llvm-project/pull/75749


More information about the llvm-commits mailing list