summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2018-10-17 22:21:05 -0400
committerAndrew Morrow <acm@mongodb.com>2018-10-30 13:01:30 -0400
commit6d475fdb5a76acab760ce4b6709b60a4c8c9aec6 (patch)
treeb0690e155382de9115a6b8b2daa36da0cef4e5ae /SConstruct
parent27d6f6977113551e0e3444b4f76c646d94e75a49 (diff)
downloadmongo-6d475fdb5a76acab760ce4b6709b60a4c8c9aec6.tar.gz
SERVER-37488 SERVER-37596 Manage debug info and symbol maps info for embedded builds
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct18
1 files changed, 17 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 99031628a1c..674b0af254e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -226,6 +226,15 @@ add_option('dbg',
type='choice',
)
+add_option('separate-debug',
+ choices=['on', 'off'],
+ const='on',
+ default='off',
+ help='Produce separate debug files (only effective in --install-mode=hygienic)',
+ nargs='?',
+ type='choice',
+)
+
add_option('spider-monkey-dbg',
choices=['on', 'off'],
const='on',
@@ -1314,7 +1323,8 @@ if link_model.startswith("dynamic"):
def library(env, target, source, *args, **kwargs):
sharedLibrary = env.SharedLibrary(target, source, *args, **kwargs)
sharedArchive = env.SharedArchive(target, source=sharedLibrary[0].sources, *args, **kwargs)
- return (sharedLibrary, sharedArchive)
+ sharedLibrary.extend(sharedArchive)
+ return sharedLibrary
env['BUILDERS']['Library'] = library
env['BUILDERS']['LibraryObject'] = env['BUILDERS']['SharedObject']
@@ -3518,6 +3528,10 @@ env = doConfigure( env )
# TODO: Later, this should live somewhere more graceful.
if get_option('install-mode') == 'hygienic':
+
+ if get_option('separate-debug') == "on":
+ env.Tool('separate_debug')
+
env.Tool('auto_install_binaries')
if env['PLATFORM'] == 'posix':
env.AppendUnique(
@@ -3547,6 +3561,8 @@ if get_option('install-mode') == 'hygienic':
"-Wl,-install_name,@rpath/${TARGET.file}",
],
)
+elif get_option('separate-debug') == "on":
+ env.FatalError('Cannot use --separate-debug without --install-mode=hygienic')
# Now that we are done with configure checks, enable icecream, if available.
env.Tool('icecream')