3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-30 21:19:30 +00:00

log: Print static message as fatal error for YOSYS_ABORT

This commit is contained in:
Jannis Harder 2025-09-23 14:26:53 +02:00
parent 86a46b9e5c
commit 2dce50516b
2 changed files with 11 additions and 1 deletions

View file

@ -142,7 +142,12 @@
#define YOSYS_CONSTEVAL constexpr
#endif
#define YOSYS_ABORT(s) abort()
#define YOSYS_ABORT(s) YOSYS_NAMESPACE_PREFIX log_yosys_abort_message(__FILE__, __LINE__, __FUNCTION__, s)
// This has to precede including "kernel/io.h"
YOSYS_NAMESPACE_BEGIN
[[noreturn]] void log_yosys_abort_message(std::string_view file, int line, std::string_view func, std::string_view message);
YOSYS_NAMESPACE_END
#include "kernel/io.h"