From 3ffaaeae4f48676a69b9d72a046c22d014424b7f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 5 Jun 2012 19:56:24 +0000 Subject: [PATCH] Remove debug symbols from Python extension when not in debug mode --- src/python/SConscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/python/SConscript b/src/python/SConscript index 02da8d35b..959f3f6fb 100644 --- a/src/python/SConscript +++ b/src/python/SConscript @@ -14,6 +14,9 @@ localenv.Append(CPPPATH=[gcv('INCLUDEPY'), env['python_array_include']], if '-Wstrict-prototypes' in localenv['CPPFLAGS']: localenv['CPPFLAGS'].remove('-Wstrict-prototypes') +if '-g' in localenv['CPPFLAGS'] and not env['debug']: + localenv['CPPFLAGS'].remove('-g') + if localenv['OS'] == 'Windows': localenv.Append(LIBPATH=pjoin(gcv('prefix'), 'libs'))