You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
server: Add support for statically linking libgcc and libstdc++
This commit is contained in:
@@ -22,6 +22,7 @@ def get_opts():
|
|||||||
from SCons.Variables import BoolVariable
|
from SCons.Variables import BoolVariable
|
||||||
return [
|
return [
|
||||||
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
|
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
|
||||||
|
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -132,3 +133,7 @@ def configure(env):
|
|||||||
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
||||||
env.Append(LIBS=['pthread'])
|
env.Append(LIBS=['pthread'])
|
||||||
env.Append(LIBS=['dl'])
|
env.Append(LIBS=['dl'])
|
||||||
|
|
||||||
|
# Link those statically for portability
|
||||||
|
if env['use_static_cpp']:
|
||||||
|
env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])
|
||||||
|
|||||||
Reference in New Issue
Block a user