diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-10-17 22:21:05 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-10-30 13:03:33 -0400 |
commit | 212a562116854d1cad0aa5089efa49787fe77be5 (patch) | |
tree | bd71bca782036248ececa35178d04f783131c857 /SConstruct | |
parent | 19b42b261fd82dc37d7de0aa6a3344e2fbe53384 (diff) | |
download | mongo-212a562116854d1cad0aa5089efa49787fe77be5.tar.gz |
SERVER-37488 SERVER-37596 Manage debug info and symbol maps info for embedded builds
(cherry picked from commit 6d475fdb5a76acab760ce4b6709b60a4c8c9aec6)
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index d1b982329c0..d8a555b9db6 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', @@ -1305,7 +1314,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'] @@ -3427,6 +3437,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( @@ -3456,6 +3470,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') |