mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #113029 from akien-mga/2.1-build-fixes
[2.1] More build fixes
This commit is contained in:
commit
162340457c
7 changed files with 19 additions and 12 deletions
12
SConstruct
12
SConstruct
|
|
@ -65,11 +65,15 @@ elif (os.name == "nt"):
|
|||
if (os.getenv("VCINSTALLDIR") == None or platform_arg == "android" or platform_arg == "javascript"):
|
||||
custom_tools = ['mingw']
|
||||
|
||||
# We let SCons build its default ENV as it includes OS-specific things which we don't
|
||||
# want to have to pull in manually.
|
||||
# Then we prepend PATH to make it take precedence, while preserving SCons' own entries.
|
||||
env_base = Environment(tools=custom_tools)
|
||||
if 'TERM' in os.environ:
|
||||
env_base['ENV']['TERM'] = os.environ['TERM']
|
||||
env_base.AppendENVPath('PATH', os.getenv('PATH'))
|
||||
env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
|
||||
env_base.PrependENVPath("PATH", os.getenv("PATH"))
|
||||
env_base.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))
|
||||
if "TERM" in os.environ: # Used for colored output.
|
||||
env_base["ENV"]["TERM"] = os.environ["TERM"]
|
||||
|
||||
env_base.global_defaults = global_defaults
|
||||
env_base.android_maven_repos = []
|
||||
env_base.android_flat_dirs = []
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ if (env["platform"] in ["haiku", "osx", "windows", "x11"]):
|
|||
env.Append(CPPFLAGS=['-DGLEW_STATIC'])
|
||||
env.Append(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env.Append(CPPFLAGS=['-DGLEW_ENABLED'])
|
||||
env.Append(CPPFLAGS=['-DGLEW_ENABLED', '-DGLEW_NO_GLU'])
|
||||
|
||||
# Godot source files
|
||||
env.add_source_files(env.drivers_sources, "*.cpp")
|
||||
|
|
|
|||
|
|
@ -33,5 +33,7 @@ obj = env_ios.Object('godot_iphone.cpp')
|
|||
|
||||
prog = None
|
||||
prog = env_ios.add_program('#bin/godot', [obj] + iphone_lib)
|
||||
|
||||
if env['separate_debug_symbols']:
|
||||
action = "$IPHONEPATH/usr/bin/dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM"
|
||||
env.AddPostAction(prog, action)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ def get_opts():
|
|||
('ios_exceptions', 'Enable exceptions', 'no'),
|
||||
('ios_triple', 'Triple for ios toolchain', ''),
|
||||
('ios_sim', 'Build simulator binary', 'no'),
|
||||
('use_lto', 'Use link time optimization', 'no')
|
||||
('use_lto', 'Use link time optimization', 'no'),
|
||||
('separate_debug_symbols', 'Extract debug symbols in .dSYM archive', False),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ files = [
|
|||
|
||||
prog = env.add_program('#bin/godot', files)
|
||||
|
||||
if (env['target'] == "debug" or env['target'] == "release_debug"):
|
||||
if env['separate_debug_symbols'] and (env['target'] == "debug" or env['target'] == "release_debug"):
|
||||
# Build the .dSYM file for atos
|
||||
action = "dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM"
|
||||
env.AddPostAction(prog, action)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ def get_opts():
|
|||
|
||||
return [
|
||||
('osxcross_sdk', 'OSXCross SDK version', 'darwin14'),
|
||||
|
||||
('separate_debug_symbols', 'Extract debug symbols in .dSYM archive', False),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -239,10 +239,10 @@ def configure(env):
|
|||
|
||||
if (is64 and env["bits"] == "32"):
|
||||
env.Append(CPPFLAGS=['-m32'])
|
||||
env.Append(LINKFLAGS=['-m32', '-L/usr/lib/i386-linux-gnu'])
|
||||
env.Append(LINKFLAGS=['-m32'])
|
||||
elif (not is64 and env["bits"] == "64"):
|
||||
env.Append(CPPFLAGS=['-m64'])
|
||||
env.Append(LINKFLAGS=['-m64', '-L/usr/lib/i686-linux-gnu'])
|
||||
env.Append(LINKFLAGS=['-m64'])
|
||||
|
||||
import methods
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue