Skip to content

Commit 4502c2c

Browse files
Revert "cmake: define NDEBUG on the QuickJS library target"
This reverts commit bf4183d.
1 parent bf4183d commit 4502c2c

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,6 @@ endif()
151151
if(NAPI_JAVASCRIPT_ENGINE STREQUAL "QuickJS")
152152
option(QJS_BUILD_LIBC "Build QuickJS with libc support." ON)
153153
FetchContent_MakeAvailable_With_Message(quickjs-ng)
154-
# Always disable assert() inside the QuickJS library, including in Debug
155-
# builds. QuickJS asserts that rt->gc_obj_list is empty in JS_FreeRuntime,
156-
# which can fire on teardown when external (non-cycle-collected) refs from
157-
# the embedder pin objects. Defining NDEBUG turns those asserts into no-ops
158-
# and lets QuickJS's own free-everything fallback path run without aborting
159-
# the process. This only affects the quickjs/qjs targets; our own code is
160-
# still built with asserts enabled.
161-
foreach(_qjs_target qjs qjs-libc)
162-
if(TARGET ${_qjs_target})
163-
target_compile_definitions(${_qjs_target} PRIVATE NDEBUG)
164-
endif()
165-
endforeach()
166154
endif()
167155

168156
if(NAPI_JAVASCRIPT_ENGINE STREQUAL "V8" AND JSRUNTIMEHOST_CORE_APPRUNTIME_V8_INSPECTOR)

0 commit comments

Comments
 (0)