Skip to content

Commit 1763d27

Browse files
committed
Better flags
1 parent 8e46eed commit 1763d27

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

SConstruct

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ if target_platform == 'linux':
4747
env["CXX"] = "clang++"
4848
env["LINK"] = "clang++"
4949

50-
env.Append(CCFLAGS = [ '-fPIC', '-g', '-O3', '-std=c++14', '-Wwrite-strings' ])
50+
if (env["target"] == "debug"):
51+
env.Prepend(CCFLAGS=['-g3'])
52+
env.Append(LINKFLAGS=['-rdynamic'])
53+
else:
54+
env.Prepend(CCFLAGS=['-O3'])
55+
56+
env.Append(CCFLAGS=['-fPIC', '-std=c++11'])
5157

5258
if target_arch == '32':
5359
env.Append(CCFLAGS = [ '-m32' ])
@@ -84,7 +90,7 @@ elif target_platform == 'windows':
8490
env.Append(LINKFLAGS = [ '--static', '-Wl,--no-undefined', '-static-libgcc', '-static-libstdc++' ])
8591

8692
elif target_platform == 'osx':
87-
if ARGUMENTS.get('use_llvm', 'no') == 'yes':
93+
if env['use_llvm']:
8894
env['CXX'] = 'clang++'
8995

9096
# Only 64-bits is supported for OS X

0 commit comments

Comments
 (0)