summary refs log tree commit diff stats
path: root/lib/system/orc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/orc.nim')
-rw-r--r--lib/system/orc.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/system/orc.nim b/lib/system/orc.nim
index ac6211ebb..cf8d6379a 100644
--- a/lib/system/orc.nim
+++ b/lib/system/orc.nim
@@ -103,9 +103,10 @@ proc nimTraceRefDyn(q: pointer; env: pointer) {.compilerRtl, inline.} =
     j.traceStack.add(head p[], cast[ptr PNimTypeV2](p[])[])
 
 template orcAssert(cond, msg) =
-  if not cond:
-    cfprintf(cstderr, "[Bug!] %s\n", msg)
-    quit 1
+  when logOrc:
+    if not cond:
+      cfprintf(cstderr, "[Bug!] %s\n", msg)
+      quit 1
 
 var
   roots {.threadvar.}: CellSeq