Skip to content

Commit 9637f5c

Browse files
IamXanderEvergreen Agent
authored and
Evergreen Agent
committed
SERVER-78304 Disabled debug builds with libunwind on arm
1 parent a314158 commit 9637f5c

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

SConstruct

+17-3
Original file line numberDiff line numberDiff line change
@@ -2173,20 +2173,34 @@ use_libunwind = get_option("use-libunwind")
21732173
use_system_libunwind = use_system_version_of_library("libunwind")
21742174

21752175
# Assume system libunwind works if it's installed and selected.
2176-
can_use_libunwind = (use_system_libunwind or env.TargetOSIs('linux') and
2177-
(env['TARGET_ARCH'] in ('x86_64', 'aarch64', 'ppc64le', 's390x')))
2176+
# TODO SERVER-75120: Revert the special handling for arch when this ticket is complete
2177+
can_use_libunwind_arch = env.TargetOSIs(
2178+
'linux') and env['TARGET_ARCH'] == 'aarch64' and not debugBuild
2179+
can_use_libunwind = (use_system_libunwind
2180+
or (env.TargetOSIs('linux')
2181+
and env['TARGET_ARCH'] in ('x86_64', 'ppc64le', 's390x'))
2182+
or can_use_libunwind_arch)
21782183

21792184
if use_libunwind == "off":
21802185
use_libunwind = False
21812186
use_system_libunwind = False
21822187
elif use_libunwind == "on":
21832188
use_libunwind = True
2189+
# TODO SERVER-75120: Revert the special handling for arch when this ticket is complete
21842190
if not can_use_libunwind:
2185-
env.ConfError("libunwind not supported on target platform")
2191+
if not can_use_libunwind_arch:
2192+
env.ConfError(
2193+
"libunwind not supported on amd64 with debug build see SERVER-75120. Recompile with '--use-libunwind=off'"
2194+
)
2195+
env.ConfError("libunwind not supported on target platform.")
21862196
Exit(1)
21872197
elif use_libunwind == "auto":
21882198
use_libunwind = can_use_libunwind
21892199

2200+
# TODO SERVER-75120: Revert the special handling for arch when this ticket is complete
2201+
if not can_use_libunwind_arch:
2202+
env.Append(LINKFLAGS=['-rdynamic'])
2203+
21902204
use_vendored_libunwind = use_libunwind and not use_system_libunwind
21912205
if use_system_libunwind and not use_libunwind:
21922206
print("Error: --use-system-libunwind requires --use-libunwind")

0 commit comments

Comments
 (0)