Compile commands for a given target

38 views
Skip to first unread message

Barry Revzin

unread,
Jun 20, 2022, 11:55:31 AM6/20/22
to bazel-discuss
I can use bazel aquery to do things like... list the dependencies of a given target, etc.

But if I want to exactly what compile commands are going to be run, how do I do that? "bazel build -s" will print all the commands run during the build, if they're actually run. But if the build is cached, then nothing will be printed. Is there a way to get the commands from -s in a way that doesn't require the build to also be run?

Thanks,

Barry

Konstantin

unread,
Jun 21, 2022, 1:11:44 PM6/21/22
to bazel-discuss
aquery gives you full command lines for all actions needed to build the specified target. 
Reply all
Reply to author
Forward
0 new messages