Merge pull request #581 from Faless/build/optimization_flags
Add optimization flags for android and javascript.pull/587/head
commit
784103f676
10
SConstruct
10
SConstruct
|
@ -375,6 +375,11 @@ elif env['platform'] == 'android':
|
||||||
env.Append(CCFLAGS=['--target=' + arch_info['target'] + env['android_api_level'], '-march=' + arch_info['march'], '-fPIC'])#, '-fPIE', '-fno-addrsig', '-Oz'])
|
env.Append(CCFLAGS=['--target=' + arch_info['target'] + env['android_api_level'], '-march=' + arch_info['march'], '-fPIC'])#, '-fPIE', '-fno-addrsig', '-Oz'])
|
||||||
env.Append(CCFLAGS=arch_info['ccflags'])
|
env.Append(CCFLAGS=arch_info['ccflags'])
|
||||||
|
|
||||||
|
if env['target'] == 'debug':
|
||||||
|
env.Append(CCFLAGS=['-Og', '-g'])
|
||||||
|
elif env['target'] == 'release':
|
||||||
|
env.Append(CCFLAGS=['-O3'])
|
||||||
|
|
||||||
elif env["platform"] == "javascript":
|
elif env["platform"] == "javascript":
|
||||||
env["ENV"] = os.environ
|
env["ENV"] = os.environ
|
||||||
env["CC"] = "emcc"
|
env["CC"] = "emcc"
|
||||||
|
@ -403,6 +408,11 @@ elif env["platform"] == "javascript":
|
||||||
env.Replace(SHLINKFLAGS='$LINKFLAGS')
|
env.Replace(SHLINKFLAGS='$LINKFLAGS')
|
||||||
env.Replace(SHLINKFLAGS='$LINKFLAGS')
|
env.Replace(SHLINKFLAGS='$LINKFLAGS')
|
||||||
|
|
||||||
|
if env['target'] == 'debug':
|
||||||
|
env.Append(CCFLAGS=['-O0', '-g'])
|
||||||
|
elif env['target'] == 'release':
|
||||||
|
env.Append(CCFLAGS=['-O3'])
|
||||||
|
|
||||||
env.Append(CPPPATH=[
|
env.Append(CPPPATH=[
|
||||||
'.',
|
'.',
|
||||||
env['headers_dir'],
|
env['headers_dir'],
|
||||||
|
|
Loading…
Reference in New Issue