diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-09 16:01:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 16:01:47 +0200 |
commit | 784103f6766f72137b34712ee1883aea992c1ef3 (patch) | |
tree | 962ffb7de58dd9526668d0f304e35e57bcd4ff59 /SConstruct | |
parent | 98124aafe861bd759c6cfd40395921325a367186 (diff) | |
parent | e5279d3d0f8bfccacdd1892cd5d6d8259b83d124 (diff) | |
download | redot-cpp-784103f6766f72137b34712ee1883aea992c1ef3.tar.gz |
Merge pull request #581 from Faless/build/optimization_flags
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'], |