summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-08-26 20:06:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-29 18:44:31 +0000
commit26054e10384bd0d46de6e047a36083181d872be1 (patch)
tree0db311e7414506b55a090468a81a440483ea4711 /SConstruct
parent8e4a1a6d60a38daa6a0598d52cae76e7b34eda49 (diff)
downloadmongo-26054e10384bd0d46de6e047a36083181d872be1.tar.gz
SERVER-68475 use debug-types-section to reduce debug info
(cherry picked from commit b41c85c2e798f11db81b6c0ba3ca400bbf01f063)
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct13
1 files changed, 10 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 1a611f4daab..a249b844729 100755
--- a/SConstruct
+++ b/SConstruct
@@ -110,9 +110,9 @@ add_option(
choices=list(BUILD_PROFILES.keys()),
default='default',
type='choice',
- help='''Short hand for common build options. These profiles are well supported by SDP and are
- kept up to date. Unless you need something specific, it is recommended that you only build with
- these. san is the recommeneded profile since it exposes bugs before they are found in patch
+ help='''Short hand for common build options. These profiles are well supported by SDP and are
+ kept up to date. Unless you need something specific, it is recommended that you only build with
+ these. san is the recommeneded profile since it exposes bugs before they are found in patch
builds. Check out site_scons/mongo/build_profiles.py to see each profile.''',
)
@@ -3752,6 +3752,13 @@ def doConfigure(myenv):
if link_model.startswith("dynamic"):
AddToLINKFLAGSIfSupported(myenv, '-Wl,--gdb-index')
+ if link_model != 'dynamic':
+ # This will create an extra section where debug types can be referred from,
+ # reducing other section sizes. This helps most with big static links as there
+ # will be lots of duplicate debug type info.
+ myenv.AddToCCFLAGSIfSupported('-fdebug-types-section')
+ myenv.AddToLINKFLAGSIfSupported('-fdebug-types-section')
+
# Our build is already parallel.
AddToLINKFLAGSIfSupported(myenv, '-Wl,--no-threads')