From cbf121df96cfce5038f52ed04f9780e19ed3b762 Mon Sep 17 00:00:00 2001
From: Sam Clegg <sbc@chromium.org>
Date: Wed, 4 Dec 2019 20:42:46 -0600
Subject: Add BYN_ENABLE_ASSERTSION option to allow assertions to be disabled.
 (#2500)

We always enable assertions by default, but this options allows for
a build without them.

Fix all errors in the ASSERTIONS=OFF build, even though we don't
normally build this its good to keep it building.
---
 src/support/debug.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/support/debug.cpp')

diff --git a/src/support/debug.cpp b/src/support/debug.cpp
index 15b708d5e..da006e9c0 100644
--- a/src/support/debug.cpp
+++ b/src/support/debug.cpp
@@ -20,6 +20,8 @@
 #include <set>
 #include <string>
 
+#ifndef NDEBUG
+
 static bool debugEnabled = false;
 static std::set<std::string> debugTypesEnabled;
 
@@ -49,3 +51,5 @@ void wasm::setDebugEnabled(const char* types) {
     start += type_size + 1;
   }
 }
+
+#endif
-- 
cgit v1.2.3