3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-28 12:56:30 +00:00

Drop YOSYS_ENABLE_HELP_SOURCE since C++20 is required.

This commit is contained in:
Catherine 2026-05-27 08:31:58 +00:00
parent 63fae93998
commit ce6621b985
5 changed files with 9 additions and 27 deletions

View file

@ -23,29 +23,15 @@
#include "kernel/yosys_common.h"
#include "kernel/yosys.h"
#ifdef YOSYS_ENABLE_HELP_SOURCE
#include <version>
# if __cpp_lib_source_location == 201907L
#include <source_location>
using std::source_location;
#define HAS_SOURCE_LOCATION
# elif defined(__has_include)
# if __has_include(<experimental/source_location>)
#include <experimental/source_location>
using std::experimental::source_location;
#define HAS_SOURCE_LOCATION
# endif
# endif
#endif
#ifndef HAS_SOURCE_LOCATION
struct source_location { // dummy placeholder
int line() const { return 0; }
int column() const { return 0; }
const char* file_name() const { return "unknown"; }
const char* function_name() const { return "unknown"; }
static const source_location current(...) { return source_location(); }
};
#include <version>
#if __cpp_lib_source_location >= 201907L
#include <source_location>
using std::source_location;
#elif defined(__has_include)
#if __has_include(<experimental/source_location>)
#include <experimental/source_location>
using std::experimental::source_location;
#endif
#endif
YOSYS_NAMESPACE_BEGIN

View file

@ -17,6 +17,5 @@
#cmakedefine YOSYS_ENABLE_TCL
#cmakedefine YOSYS_ENABLE_PYTHON
#cmakedefine YOSYS_ENABLE_VERIFIC
#cmakedefine YOSYS_ENABLE_HELP_SOURCE
#endif