Access build information from skylark rule/macro?

147 views
Skip to first unread message

Ming Zhao

unread,
May 22, 2015, 1:05:21 PM5/22/15
to bazel-...@googlegroups.com
Hi,

I'm writing a skylark rule to allow me to generate deb package using bazel.
Like stamping when linking cc_binary, I would like to encode some
build information into the debian package, is there any API/document
talking about what kind information can be presented in the build info
and how to access them within skylark rules?

Thanks!

Han-Wen Nienhuys

unread,
May 26, 2015, 8:01:20 AM5/26/15
to Ming Zhao, Lukács T. Berki, bazel-...@googlegroups.com
Unfortunately, there is no documentation. Lukacs teased it apart from
the original google code, so he might know better.
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAN0GiO2hzJZ-aaPhO1JDmXcPCjJefZiusVatw-U3wGkokfP8Sg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Han-Wen Nienhuys
Google Munich
han...@google.com

Lukács T. Berki

unread,
May 26, 2015, 8:36:07 AM5/26/15
to Han-Wen Nienhuys, Ming Zhao, bazel-...@googlegroups.com, Laurent Le Brun
Bazel currently does not output anything else in the build stamp files than the value of --embed_label:


During the build, it's theoretically written into stable-status.txt and volatile-status.txt (the latter contains data that is usually different in every build, e.g. the current time, currently empty in Bazel), but I don't think it's available from Skylark at the moment. I think (paging Laurent!) it could be pretty easily made available, though.

For the time being, I filed https://github.com/google/bazel/issues/210 to track this.
--
Lukács T. Berki | Software Engineer | lbe...@google.com | 

Google Germany GmbH | Dienerstrasse 12 | 80331 München | Germany | Geschäftsführer: Graham Law, Christine Elizabeth Flores | Registergericht und -nummer: Hamburg, HRB 86891

Reply all
Reply to author
Forward
0 new messages