diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-05 15:45:51 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-05 15:53:52 +0200 |
commit | e5279d3d0f8bfccacdd1892cd5d6d8259b83d124 (patch) | |
tree | 0332f168449a4786a89d930b9e11a2dafc75fcd1 /SConstruct | |
parent | dbf3a13d0faad856726b96942425e08618aa89d3 (diff) | |
download | redot-cpp-e5279d3d0f8bfccacdd1892cd5d6d8259b83d124.tar.gz |
Add optimization flags for android and javascript.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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=arch_info['ccflags']) + if env['target'] == 'debug': + env.Append(CCFLAGS=['-Og', '-g']) + elif env['target'] == 'release': + env.Append(CCFLAGS=['-O3']) + elif env["platform"] == "javascript": env["ENV"] = os.environ env["CC"] = "emcc" @@ -403,6 +408,11 @@ elif env["platform"] == "javascript": 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['headers_dir'], |