Remove assert(x) hack in favor of NDEBUG

basis_transcoder.js 140999
basis_transcoder.wasm 832985
This commit is contained in:
Arseny Kapoulkine
2019-05-22 20:51:29 -07:00
parent a52a31e5b0
commit af8f9f8bc4
4 changed files with 2 additions and 9 deletions

View File

@@ -50,13 +50,6 @@
#include <assert.h>
#include <random>
#if defined(__EMSCRIPTEN__) && !defined(_DEBUG) && !defined(DEBUG)
// HUGE HACK: I've been unable to disable assertions using emcc -O2 -s ASSERTIONS=0, no idea why.
// We definitely don't want them enabled in release.
#undef assert
#define assert(x) ((void)0)
#endif
#ifdef max
#undef max
#endif

View File

@@ -15,5 +15,5 @@ if (EMSCRIPTEN)
set_target_properties(basis_transcoder.js PROPERTIES
OUTPUT_NAME "basis_transcoder"
SUFFIX ".js"
LINK_FLAGS "--bind -s ALLOW_MEMORY_GROWTH=1 -O3 -s ASSERTIONS=0")
LINK_FLAGS "--bind -s ALLOW_MEMORY_GROWTH=1 -O3 -s ASSERTIONS=0 -DNDEBUG")
endif()

File diff suppressed because one or more lines are too long