summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-16 17:15:52 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-16 17:15:52 -0400
commitbc2983928dc8f98051321846d8c8fa374c8181b6 (patch)
tree0583aa92ab796ba6c4167618ff1f757e58c9e174 /src/main.cc
parent5e1870e259e866f3720bddbf757dec0c781cc967 (diff)
downloadfork-ledger-bc2983928dc8f98051321846d8c8fa374c8181b6.tar.gz
fork-ledger-bc2983928dc8f98051321846d8c8fa374c8181b6.tar.bz2
fork-ledger-bc2983928dc8f98051321846d8c8fa374c8181b6.zip
Compilation verification code only with debugging
Previously, --verify would work even if the sources were built with default options. However, in the interests of performance, --verify is now only available if --enable-debug was passed to configure.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 26f3fe31..58b3f169 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -62,7 +62,9 @@ int main(int argc, char * argv[], char * envp[])
// --debug CATEGORY ; turns on debug logging
// --trace LEVEL ; turns on trace logging
handle_debug_options(argc, argv);
+#if defined(VERIFY_ON)
IF_VERIFY() initialize_memory_tracing();
+#endif
INFO("Ledger starting");
@@ -193,7 +195,9 @@ int main(int argc, char * argv[], char * envp[])
global_scope.reset();
INFO("Ledger ended (Boost/libstdc++ may still hold memory)");
+#if defined(VERIFY_ON)
shutdown_memory_tracing();
+#endif
} else {
// Don't free anything, just let it all leak.
global_scope.release();