Bazel build verbose compiler commands logging

Jan picture Jan · Sep 28, 2015 · Viewed 23.7k times · Source

How can I increase the verbosity of the build process? Bazel seems to print compiler commands only if something goes wrong during the build.

I would like to see which compiler comands the cc_library rule fires, even if everything seems to be fine, to debug linking problems. I already tried various bazel command line parameters but nothing gives me the compiler commands :(

Answer

Damien Martin-Guillerez picture Damien Martin-Guillerez · Sep 29, 2015

This is probably what you are looking for

bazel build -s //my:target

The -s switch makes Bazel print out all the invoked commands.