Made "cover" a compile-time option (disabled by default)
[yosys.git] / kernel / log.h
index 81d01ace7fcd74fd263b19364bd606dd208e4a41..a6f80892249df662afbfc5ee0d43724a291c0179 100644 (file)
@@ -87,8 +87,7 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi
 // This is the magic behind the code coverage counters
 // ---------------------------------------------------
 
-#if defined(__linux__) && !defined(NDEBUG)
-#define COVER_ACTIVE
+#ifdef YOSYS_ENABLE_COVER
 
 #define cover(_id) do { \
     static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1))) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \