summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-04-17 16:39:31 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-04-17 16:41:45 +0200
commit1763d278e0b06f26cce8990c4787fe740c712255 (patch)
tree2b11d97531d127257e4beda2312b97cf2a84acca /SConstruct
parent8e46eed9e8109296b9bf9e594a8ec5654535d8cb (diff)
downloadfork-godot-webrtc-native-1763d278e0b06f26cce8990c4787fe740c712255.tar.gz
fork-godot-webrtc-native-1763d278e0b06f26cce8990c4787fe740c712255.tar.bz2
fork-godot-webrtc-native-1763d278e0b06f26cce8990c4787fe740c712255.zip
Better flags
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 8 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 53ee7bf..31dda00 100644
--- a/SConstruct
+++ b/SConstruct
@@ -47,7 +47,13 @@ if target_platform == 'linux':
env["CXX"] = "clang++"
env["LINK"] = "clang++"
- env.Append(CCFLAGS = [ '-fPIC', '-g', '-O3', '-std=c++14', '-Wwrite-strings' ])
+ if (env["target"] == "debug"):
+ env.Prepend(CCFLAGS=['-g3'])
+ env.Append(LINKFLAGS=['-rdynamic'])
+ else:
+ env.Prepend(CCFLAGS=['-O3'])
+
+ env.Append(CCFLAGS=['-fPIC', '-std=c++11'])
if target_arch == '32':
env.Append(CCFLAGS = [ '-m32' ])
@@ -84,7 +90,7 @@ elif target_platform == 'windows':
env.Append(LINKFLAGS = [ '--static', '-Wl,--no-undefined', '-static-libgcc', '-static-libstdc++' ])
elif target_platform == 'osx':
- if ARGUMENTS.get('use_llvm', 'no') == 'yes':
+ if env['use_llvm']:
env['CXX'] = 'clang++'
# Only 64-bits is supported for OS X