mirror of https://github.com/mongodb/mongo
SERVER-98649 Enable minimal debug in benchmark CI builds (#30510)
GitOrigin-RevId: 333c8b89d719acddae321f50da13e6a8ecdd9ae2
This commit is contained in:
parent
77420b9422
commit
de92d5851f
12
SConstruct
12
SConstruct
|
|
@ -349,14 +349,12 @@ add_option(
|
||||||
type="choice",
|
type="choice",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_option(
|
add_option(
|
||||||
"debug-symbols",
|
"debug-symbols",
|
||||||
choices=["on", "off"],
|
choices=["on", "off", "minimal"],
|
||||||
const="on",
|
|
||||||
default=build_profile.debug_symbols,
|
default=build_profile.debug_symbols,
|
||||||
help="Enable producing debug symbols",
|
help="Enable producing debug symbols",
|
||||||
nargs="?",
|
nargs=1,
|
||||||
type="choice",
|
type="choice",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -2146,7 +2144,7 @@ env.AddMethod(is_toolchain, "ToolchainIs")
|
||||||
|
|
||||||
releaseBuild = get_option("release") == "on"
|
releaseBuild = get_option("release") == "on"
|
||||||
debugBuild = get_option("dbg") == "on"
|
debugBuild = get_option("dbg") == "on"
|
||||||
debug_symbols = get_option("debug-symbols") == "on"
|
debug_symbols = get_option("debug-symbols") != "off"
|
||||||
optBuild = mongo_generators.get_opt_options(env)
|
optBuild = mongo_generators.get_opt_options(env)
|
||||||
|
|
||||||
if env.get("ENABLE_BUILD_RETRY"):
|
if env.get("ENABLE_BUILD_RETRY"):
|
||||||
|
|
@ -4700,8 +4698,10 @@ def doConfigure(myenv):
|
||||||
# Turn off debug symbols. Due to g0 disabling any previously added debugging flags,
|
# Turn off debug symbols. Due to g0 disabling any previously added debugging flags,
|
||||||
# it is easier to append g0 near the end rather than trying to not add all the other
|
# it is easier to append g0 near the end rather than trying to not add all the other
|
||||||
# debug flags. This should be added after any debug flags.
|
# debug flags. This should be added after any debug flags.
|
||||||
if not debug_symbols:
|
if get_option("debug-symbols") == "off":
|
||||||
myenv.AppendUnique(LINKFLAGS=["-g0"], CCFLAGS=["-g0"])
|
myenv.AppendUnique(LINKFLAGS=["-g0"], CCFLAGS=["-g0"])
|
||||||
|
elif get_option("debug-symbols") == "minimal":
|
||||||
|
myenv.AppendUnique(LINKFLAGS=["-g1"], CCFLAGS=["-g1"])
|
||||||
|
|
||||||
# Our build is already parallel.
|
# Our build is already parallel.
|
||||||
if not myenv.AddToLINKFLAGSIfSupported("-Wl,--no-threads"):
|
if not myenv.AddToLINKFLAGSIfSupported("-Wl,--no-threads"):
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,8 @@ buildvariants:
|
||||||
MONGO_DISTMOD=amazon2
|
MONGO_DISTMOD=amazon2
|
||||||
-j$(grep -c ^processor /proc/cpuinfo)
|
-j$(grep -c ^processor /proc/cpuinfo)
|
||||||
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
||||||
|
--debug-symbols=minimal
|
||||||
|
separate_debug: off
|
||||||
scons_cache_scope: shared
|
scons_cache_scope: shared
|
||||||
compile_variant: *al2023-arm64-sep-benchmark
|
compile_variant: *al2023-arm64-sep-benchmark
|
||||||
tasks:
|
tasks:
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,8 @@ buildvariants:
|
||||||
MONGO_DISTMOD=rhel88
|
MONGO_DISTMOD=rhel88
|
||||||
-j$(grep -c ^processor /proc/cpuinfo)
|
-j$(grep -c ^processor /proc/cpuinfo)
|
||||||
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
||||||
|
--debug-symbols=minimal
|
||||||
|
separate_debug: off
|
||||||
scons_cache_scope: shared
|
scons_cache_scope: shared
|
||||||
num_scons_link_jobs_available: 0.5
|
num_scons_link_jobs_available: 0.5
|
||||||
compile_variant: *enterprise-rhel-8-benchmarks
|
compile_variant: *enterprise-rhel-8-benchmarks
|
||||||
|
|
|
||||||
|
|
@ -1289,7 +1289,8 @@ def generate(env: SCons.Environment.Environment) -> None:
|
||||||
f"--compiler_type={env.ToolchainName()}",
|
f"--compiler_type={env.ToolchainName()}",
|
||||||
f'--opt={env.GetOption("opt")}',
|
f'--opt={env.GetOption("opt")}',
|
||||||
f'--dbg={env.GetOption("dbg") == "on"}',
|
f'--dbg={env.GetOption("dbg") == "on"}',
|
||||||
f'--debug_symbols={env.GetOption("debug-symbols") == "on"}',
|
f'--debug_symbols={env.GetOption("debug-symbols") != "off"}',
|
||||||
|
f'--dbg_level={1 if env.GetOption("debug-symbols") == "minimal" else 2}',
|
||||||
f'--thin_lto={env.GetOption("thin-lto") is not None}',
|
f'--thin_lto={env.GetOption("thin-lto") is not None}',
|
||||||
f'--separate_debug={True if env.GetOption("separate-debug") == "on" else False}',
|
f'--separate_debug={True if env.GetOption("separate-debug") == "on" else False}',
|
||||||
f'--libunwind={env.GetOption("use-libunwind")}',
|
f'--libunwind={env.GetOption("use-libunwind")}',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue