summaryrefslogtreecommitdiff
path: root/modules/SCsub
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-12-09 19:22:08 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-12-11 15:40:28 +0100
commitc320a822132223eba5b317314c5cdc001799d423 (patch)
tree4bfa4424bfb7d931cfd7717dae4f4728ec5804ba /modules/SCsub
parentcd9d5132854e239726a08098d9029bdd00eee752 (diff)
SCons: Add 'split_libmodules' option to workaround linker issue
The new 'split_libmodules=yes' option is useful to work around linker command line size limitations when linking a huge number of objects. We're currently over 64k chars when linking libmodules.a on Windows with MinGW, which triggers issues as seen in #30892. Even on Linux, we can also reach linker command line size limitations by adding more custom modules. We force this option to True for MinGW on Windows, which fixes #30892. Additional changes to lib splitting: - Fix linking of the split module libs with interdependent symbols, hacking our way into LINKCOM and SHLINKCOM to set the `--start-group` and `--end-group` flags. - Fix Python 3 compatibility in `methods.split_lib()`. - Drop seemingly obsolete condition for 'msys' on 'posix'. - Drop the unnecessary 'split_drivers' as the drivers lib is no longer too big since we moved all thirdparty builds to modules. Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
Diffstat (limited to 'modules/SCsub')
-rw-r--r--modules/SCsub2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/SCsub b/modules/SCsub
index 42d89d6ce2..dc0420616c 100644
--- a/modules/SCsub
+++ b/modules/SCsub
@@ -16,7 +16,7 @@ for x in env.module_list:
env_modules.Append(CPPDEFINES=["MODULE_" + x.upper() + "_ENABLED"])
SConscript(x + "/SCsub")
-if env.split_modules:
+if env['split_libmodules']:
env.split_lib("modules", env_lib = env_modules)
else:
lib = env_modules.add_library("modules", env.modules_sources)