aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-11-06 09:39:55 +0100
committerClifford Wolf <clifford@clifford.at>2014-11-06 09:39:55 +0100
commita346c0bf2b0ed5278e0f86d4ef23a6a9d03eef40 (patch)
tree57c95841b9f5c2c7cd6a1dd1d0d59f8239dba670 /kernel
parent80869531b91b0fd8da90a1bebdc8d81d35e36e23 (diff)
downloadyosys-a346c0bf2b0ed5278e0f86d4ef23a6a9d03eef40.tar.gz
yosys-a346c0bf2b0ed5278e0f86d4ef23a6a9d03eef40.tar.bz2
yosys-a346c0bf2b0ed5278e0f86d4ef23a6a9d03eef40.zip
Made "cover" a compile-time option (disabled by default)
Diffstat (limited to 'kernel')
-rw-r--r--kernel/driver.cc2
-rw-r--r--kernel/log.cc2
-rw-r--r--kernel/log.h3
3 files changed, 3 insertions, 4 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc
index 5e69cced3..8164fef28 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -335,7 +335,7 @@ int main(int argc, char **argv)
log("%s\n", out_count ? "" : " no commands executed");
}
-#ifdef COVER_ACTIVE
+#ifdef YOSYS_ENABLE_COVER
if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE"))
{
char filename_buffer[4096];
diff --git a/kernel/log.cc b/kernel/log.cc
index 807f58bf6..1a21e9fe6 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -274,7 +274,7 @@ void log_cell(RTLIL::Cell *cell, std::string indent)
// ---------------------------------------------------
// This is the magic behind the code coverage counters
// ---------------------------------------------------
-#ifdef COVER_ACTIVE
+#ifdef YOSYS_ENABLE_COVER
std::map<std::string, std::pair<std::string, int>> extra_coverage_data;
diff --git a/kernel/log.h b/kernel/log.h
index 81d01ace7..a6f808922 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -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 }; \