Skip to content

Commit

Permalink
Enable assertions in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexp-sssup committed May 19, 2010
1 parent 740cd8c commit f2fa1e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion abc.cpp
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion swftypes.cpp
Expand Up @@ -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++)
{
Expand Down

0 comments on commit f2fa1e8

Please sign in to comment.