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?

1
  • 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, 2020 at 3:29

2 Answers 2

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
1
  • This is what works for me on AOSP version 9
    – Ber
    Jul 1, 2021 at 8:28
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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.