summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2018-05-16 13:25:53 +0200
committerkarroffel <therzog@mail.de>2018-05-16 13:25:53 +0200
commit94ec3119240461831a46264f1465a515070706c7 (patch)
tree8ed205baa155fa1bdb24c616a7f0e6ee1956632e /SConstruct
parent684a06daf20253790c7eef59df7537dec7f41d1e (diff)
downloadredot-cpp-94ec3119240461831a46264f1465a515070706c7.tar.gz
better debugging experience on linux
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 6 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 3cbb673..fef9eb3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -27,9 +27,14 @@ if target_platform == 'linux':
if ARGUMENTS.get('use_llvm', 'no') == 'yes':
env['CXX'] = 'clang++'
- env.Append(CCFLAGS = [ '-fPIC', '-g', '-O3', '-std=c++14', '-Wwrite-strings' ])
+ env.Append(CCFLAGS = [ '-fPIC', '-g', '-std=c++14', '-Wwrite-strings' ])
env.Append(LINKFLAGS = [ '-Wl,-R,\'$$ORIGIN\'' ])
+ if target == 'debug':
+ env.Append(CCFLAGS = ['-Og'])
+ else:
+ env.Append(CCFLAGS = ['-O3'])
+
if target_arch == '32':
env.Append(CCFLAGS = [ '-m32' ])
env.Append(LINKFLAGS = [ '-m32' ])