Permalink
Browse files

Enable assertions in release mode

  • Loading branch information...
1 parent 740cd8c commit f2fa1e8fca3e99fb3d4f75ae0b7520c2843c11cc @alexp-sssup alexp-sssup committed May 19, 2010
Showing with 12 additions and 6 deletions.
  1. +4 −4 CMakeLists.txt
  2. +1 −1 abc.cpp
  3. +6 −0 debian/changelog
  4. +1 −1 swftypes.cpp
View
@@ -52,10 +52,10 @@ FIND_LIBRARY(lib_glew GLEW REQUIRED)
ENABLE_LANGUAGE(ASM-NASM)
SET(CMAKE_CXX_FLAGS "-Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -lrt -ldl")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -D_GLIBCXX_NO_DEBUG")
-SET(CMAKE_CXX_FLAGS_PROFILE "-g -pg -O2 -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_DEBIAN "-O2 -DNDEBUG")
+SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -D_GLIBCXX_NO_DEBUG -DEXPENSIVE_DEBUG")
+SET(CMAKE_CXX_FLAGS_PROFILE "-g -pg -O2")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
+SET(CMAKE_CXX_FLAGS_DEBIAN "-O2")
ADD_DEFINITIONS(-DDATADIR="${CMAKE_INSTALL_PREFIX}/share/lightspark")
View
@@ -1293,7 +1293,7 @@ void ABCVm::Run(ABCVm* th)
th->FPM=new llvm::FunctionPassManager(th->module);
th->FPM->add(new llvm::TargetData(*th->ex->getTargetData()));
-#ifndef NDEBUG
+#ifdef EXPENSIVE_DEBUG
//This is pretty heavy, do not enable in release
th->FPM->add(llvm::createVerifierPass());
#endif
View
@@ -1,3 +1,9 @@
+lightspark (0.3.3-ubuntu1) lucid; urgency=low
+
+ * Enable assertions in relese builds
+
+ -- Alessandro Pignotti <a.pignotti@sssup.it> Wed, 19 May 2010 05:26:49 +0200
+
lightspark (0.3.2-ubuntu1) lucid; urgency=low
* Enable debug output in release
View
@@ -750,7 +750,7 @@ void ASObject::check() const
//Put here a bunch of safety check on the object
assert(ref_count>0);
//Heavyweight stuff
-#ifndef NDEBUG
+#ifdef EXPENSIVE_DEBUG
variables_map::const_var_iterator it=Variables.Variables.begin();
for(;it!=Variables.Variables.end();it++)
{

0 comments on commit f2fa1e8

Please sign in to comment.