SERVER-112834 Move dev_stacktrace flag into bazelrc (#43055)

GitOrigin-RevId: f76465519687681a6da938939c92351046f5972e
This commit is contained in:
Zack Winter
2025-10-22 15:35:14 -10:00
committed by MongoDB Bot
parent ec613414c8
commit 486d653c5f
4 changed files with 44 additions and 2 deletions

View File

@@ -184,6 +184,7 @@ common --flag_alias=win_min_version=//bazel/config:win_min_version
common --flag_alias=build_atlas=//bazel/config:build_atlas
common --flag_alias=dtlto=//bazel/config:dtlto
common --flag_alias=all_headers=//bazel/config:all_headers
common --flag_alias=evg=//bazel/config:evg
#############################################################################################################################
# BUILD 'PROFILES' - this is the area to set up configurations of flags to be used by developers.
@@ -235,6 +236,7 @@ common --//bazel/config:libunwind=auto
common --//bazel/config:dtlto=False
common --//bazel/config:pgo_profile_use=False
common --//bazel/config:bolt_profile_use=False
common --//bazel/config:evg=False
common --jobs=300
common:macos --jobs=auto
common:windows --jobs=auto
@@ -351,6 +353,7 @@ common:opt_profiled --enable_platform_specific_config=true
--config=evg
common:evg --config=opt
common:evg --fission=no
common:evg --evg=True
common:evg --//bazel/config:opt=auto
common:evg --//bazel/config:separate_debug=True
common:evg --enable_platform_specific_config=true

View File

@@ -24,6 +24,7 @@ load(
"disable_warnings_as_errors",
"dtlto",
"dwarf_version",
"evg",
"fsan",
"gcov",
"http_client",
@@ -1727,7 +1728,7 @@ config_setting(
dev_stacktrace(
name = "dev_stacktrace",
build_setting_default = False,
build_setting_default = True,
)
config_setting(
@@ -1736,6 +1737,15 @@ config_setting(
flag_values = {
"//bazel/config:dev_stacktrace": "True",
"//bazel/config:release": "False",
"//bazel/config:evg": "False",
# TODO(SERVER-112857): Fix dev_stacktrace compatibility with sanitizers/symbolizer and then remove the following lines
"//bazel/config:asan": "False",
"//bazel/config:fsan": "False",
"//bazel/config:msan": "False",
"//bazel/config:lsan": "False",
"//bazel/config:tsan": "False",
"//bazel/config:ubsan": "False",
},
)
@@ -3050,3 +3060,19 @@ config_setting(
"//bazel/config:antithesis": "True",
},
)
# --------------------------------------
# evg options
# --------------------------------------
evg(
name = "evg",
build_setting_default = False,
)
config_setting(
name = "running_in_evg",
flag_values = {
"//bazel/config:evg": "True",
},
)

View File

@@ -817,3 +817,17 @@ create_dwp = rule(
implementation = lambda ctx: create_dwp_provider(enabled = ctx.build_setting_value),
build_setting = config.bool(flag = True),
)
# =========
# evg
# =========
evg_provider = provider(
doc = "Enable development-only pretty stacktraces",
fields = ["enabled"],
)
evg = rule(
implementation = lambda ctx: evg_provider(enabled = ctx.build_setting_value),
build_setting = config.bool(flag = True),
)

View File

@@ -144,7 +144,6 @@ common --bes_keywords=client_system:cpu_count={cpu_count}
common --bes_keywords=client_system:total_memory_gb={total_memory_gb}
common --bes_keywords=client_system:available_memory_gb={available_memory_gb}
common --bes_keywords=client_system:filesystem_type={filesystem_type}
common --//bazel/config:dev_stacktrace={developer_build}
"""
otel_parent_id = os.environ.get("otel_parent_id")