summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-15 16:45:11 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-15 16:46:05 -0400
commitb6dae554fe9c39b076947a7da83a3a7b01521296 (patch)
treeccf8c1a536e944793ff980dc78d0b50d65621c0d /acprep
parenta36541d4f02cd2bc3d2ce5c7fa172139c4df7064 (diff)
downloadfork-ledger-b6dae554fe9c39b076947a7da83a3a7b01521296.tar.gz
fork-ledger-b6dae554fe9c39b076947a7da83a3a7b01521296.tar.bz2
fork-ledger-b6dae554fe9c39b076947a7da83a3a7b01521296.zip
Don't build gcov Ledger with asserts enabled
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep13
1 files changed, 10 insertions, 3 deletions
diff --git a/acprep b/acprep
index dac869dd..f0784f8a 100755
--- a/acprep
+++ b/acprep
@@ -955,7 +955,10 @@ class PrepareBuild(CommandLineApp):
else:
gcc_version = "42"
- if self.current_flavor == 'debug' or self.current_flavor == 'gcov':
+ if gcc_version != "42":
+ self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1')
+
+ if self.current_flavor == 'debug':
if exists('/usr/local/stow/cppunit-gcc%s/include' % gcc_version):
self.sys_include_dirs.insert(
0, '/usr/local/stow/cppunit-gcc%s/include' % gcc_version)
@@ -968,10 +971,11 @@ class PrepareBuild(CommandLineApp):
self.sys_library_dirs.insert(
0, '/usr/local/stow/icu-gcc%s/lib' % gcc_version)
- self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1')
self.configure_args.append('--disable-shared')
self.options.use_glibcxx_debug = True
+ elif self.current_flavor == 'gcov':
+ self.configure_args.append('--disable-shared')
else:
self.CXXFLAGS.append('-march=nocona')
self.CXXFLAGS.append('-msse3')
@@ -1201,7 +1205,7 @@ class PrepareBuild(CommandLineApp):
self.log.debug('Using gcc version: %s' % gcc_version)
- if self.current_flavor == 'debug' or self.current_flavor == 'gcov':
+ if self.current_flavor == 'debug':
if self.options.use_glibcxx_debug:
self.log.debug('We are using GLIBCXX_DEBUG, so setting up flags')
self.CPPFLAGS.append('-D_GLIBCXX_DEBUG=1')
@@ -1282,6 +1286,9 @@ class PrepareBuild(CommandLineApp):
self.LDFLAGS.append(i)
def setup_flavor_gcov(self):
+ # NDEBUG is set so that branch coverage ignores the never-taken else
+ # branch inside assert statements.
+ self.CPPFLAGS.append('-DNDEBUG=1')
self.CXXFLAGS.append('-g')
self.CXXFLAGS.append('-fprofile-arcs')
self.CXXFLAGS.append('-ftest-coverage')