aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2012-12-29 20:02:37 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2012-12-29 20:02:37 +0200
commitec08280df103bb24cebe66523886a02809c3a095 (patch)
tree84205b1d2135a9b643acbca2f3a5c9239a273795
parenta7b991bfd4229bbefc93ff652cc12aa40613d8cb (diff)
downloadmeson-ec08280df103bb24cebe66523886a02809c3a095.zip
meson-ec08280df103bb24cebe66523886a02809c3a095.tar.gz
meson-ec08280df103bb24cebe66523886a02809c3a095.tar.bz2
Add debug flags to the mix.
-rwxr-xr-xenvironment.py9
-rwxr-xr-xshellgenerator.py1
2 files changed, 7 insertions, 3 deletions
diff --git a/environment.py b/environment.py
index baf9336..622f174 100755
--- a/environment.py
+++ b/environment.py
@@ -41,13 +41,16 @@ class CCompiler():
def get_exelist(self):
return self.exelist
-
+
def get_compile_only_flags(self):
return ['-c']
-
+
def get_output_flags(self):
return ['-o']
-
+
+ def get_debug_flags(self):
+ return ['-g']
+
def can_compile(self, filename):
suffix = filename.split('.')[-1]
if suffix == 'c' or suffix == 'h':
diff --git a/shellgenerator.py b/shellgenerator.py
index 3d8674d..36dce31 100755
--- a/shellgenerator.py
+++ b/shellgenerator.py
@@ -47,6 +47,7 @@ class ShellGenerator():
abs_obj = os.path.join(self.environment.get_build_dir(), src)
abs_obj += '.' + self.environment.get_object_suffix()
commands = compiler.get_exelist()
+ commands += compiler.get_debug_flags()
commands += compiler.get_std_warn_flags()
commands += compiler.get_compile_only_flags()
commands.append(abs_src)