13

How to see verbose compile command in AOSP build? ndk-build provides V=1 option. What about build from source? May I type similar to

. build/envsetup.sh
lunch 
make liblog V=1 

and see raw compiler execution lines?

valior
  • 449
  • 2
  • 4
  • 8
  • Since the change to `soong` build system the full commands can be found using: `gzip -cd out/verbose.log.gz | less -R` – Paschalis Feb 27 '20 at 03:29

2 Answers2

22

If you want to see the full compile/link/whatever commands being run, use the special showcommands target (which isn't a target to build per se, but a modifier to the output of the make command). E.g.: to build liblog you would do:

. build/envsetup.sh
lunch    
$ make showcommands liblog
Aleksander
  • 640
  • 5
  • 13
12

For someone seeking the answer on the Android build versions 10+

! The argument `showcommands` is no longer supported.
! Instead, the verbose log is always written to a compressed file in the output dir:
!
!   gzip -cd out/verbose.log.gz | less -R
!
! Older versions are saved in verbose.log.#.gz files

Here out is the directory located at <build_root>/out . This is taken from the code in the soong files here. This change was introduced with this commit.

Zoso
  • 3,273
  • 1
  • 16
  • 27
  • Can you tell as which versions qualify as "later" ? This log file does not seem to exist on AOSP 9 – Ber Jul 01 '21 at 08:26
  • 3
    @Ber I've added the clarification and added the commit that changed the logging. – Zoso Jul 01 '21 at 12:41