build: use -Og with clang as well
It is supported since 4.0
Change-Id: Ib454927e4052720fa21d004f64fa4d3699e72d73
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 13de263..538553a 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -101,6 +101,7 @@
def getDebugFlags(self, conf):
flags = super(GccBasicFlags, self).getDebugFlags(conf)
flags['CXXFLAGS'] += ['-O0',
+ '-Og', # gcc >= 4.8, clang >= 4.0
'-g3',
'-pedantic',
'-Wall',
@@ -142,9 +143,7 @@
version = tuple(int(i) for i in conf.env['CC_VERSION'])
if version < (5, 1, 0):
flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
- flags['CXXFLAGS'] += ['-Og', # gcc >= 4.8
- '-fdiagnostics-color', # gcc >= 4.9
- ]
+ flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
return flags
def getOptimizedFlags(self, conf):