bazel: rewrite MD5 .note.gnu.build-id with truncated git SHA1.#767
bazel: rewrite MD5 .note.gnu.build-id with truncated git SHA1.#767mattklein123 merged 9 commits intoenvoyproxy:masterfrom
Conversation
This is a workaround for bazelbuild/bazel#2805. Small reorganization of version_generated.cc rules, since we rely on them here and this can also assist with the Google import of Envoy and its versioning scheme. Also added docs on build types and how to do release builds.
bazel/README.md
Outdated
| modes](https://bazel.build/versions/master/docs/bazel-user-manual.html#flag--compilation_mode) | ||
| that Bazel supports: | ||
|
|
||
| * `fastbuild`: `-O0 -DDEBUG`, aimed at developer speed (default). |
There was a problem hiding this comment.
Per other PR, let's just kill -DDEBUG after checking we don't use it?
bazel/README.md
Outdated
| that Bazel supports: | ||
|
|
||
| * `fastbuild`: `-O0 -DDEBUG`, aimed at developer speed (default). | ||
| * `opt`: `-O2`, for production builds and performance benchmarking. |
There was a problem hiding this comment.
This is related to #720, but I definitely at least want the ability to set -ggdb3 on opt builds. (IMO there is no reason to not generate debugging info and have easy access when looking at core dumps, but to each there on). If we have an option builders can choose.
There was a problem hiding this comment.
Let me add this there and here (I should have split out this doco into a separate PR, but oh well).
There was a problem hiding this comment.
I've added --define debug_symbols=yes support. I actually think it probably would be just as valid to have just suggested that the invoker provider --copt=-ggdb3 as an extra bazel build arg, but this works too.
| import sys | ||
|
|
||
| # This is what the part of .note.gnu.build-id prior to the MD5 hash looks like. | ||
| EXPECTED_BUILD_ID_NOTE_PREFIX = [ |
There was a problem hiding this comment.
Your bazel hacking skills continue to astound me. 😉
| achieved with: | ||
|
|
||
| ``` | ||
| bazel --bazelrc=/dev/null build -c opt //source/exe:envoy-static.stripped.stamped |
There was a problem hiding this comment.
If I read correctly below, //source/exe:envoy-static.stamped is valid, right? (If I want a stamped, but not stripped build)?
|
@htuch sorry needs master merge again |
**Description** This is a follow up on #766 which also required the change in pr_style_check.yaml. Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This is a workaround for
bazelbuild/bazel#2805.
Small reorganization of version_generated.cc rules, since we rely on them
here and this can also assist with the Google import of Envoy and its
versioning scheme.
Also added docs on build types and how to do release builds.