pgo: Enable pgo behind release flag (#13158)

* Revert a54e61ecb0

* Configure the use of pgo profiles behind the release config flag (--config=release)
This commit is contained in:
Preston Van Loon 2023-11-08 07:33:26 -06:00 committed by GitHub
parent 4a515c36e6
commit 3097601530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,7 @@ build:minimal --@io_bazel_rules_go//go/config:tags=minimal
# Release flags
build:release --compilation_mode=opt
build:release --stamp
build:release --define pgo_enabled=1
# Build binary with cgo symbolizer for debugging / profiling.
build:cgo_symbolizer --copt=-g

View File

@ -144,6 +144,11 @@ config_setting(
values = {"define": "coverage_enabled=1"},
)
config_setting(
name = "pgo_enabled",
values = {"define": "pgo_enabled=1"},
)
common_files = {
"//:LICENSE.md": "LICENSE.md",
"//:README.md": "README.md",

View File

@ -110,6 +110,10 @@ docker_push(
go_binary(
name = "beacon-chain",
embed = [":go_default_library"],
pgoprofile = select({
"//:pgo_enabled": "pprof.beacon-chain.samples.cpu.pb.gz",
"//conditions:default": None,
}),
visibility = [
"//beacon-chain:__subpackages__",
"//testing/endtoend:__pkg__",

Binary file not shown.