mirror of https://github.com/YosysHQ/yosys.git
Improve logging use of experimental features
Signed-off-by: Claire Wolf <clifford@clifford.at>
This commit is contained in:
parent
cef607c8b7
commit
5c2508cef8
|
@ -459,7 +459,7 @@ int main(int argc, char **argv)
|
||||||
depsfile = optarg;
|
depsfile = optarg;
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
log_experimentals.insert(optarg);
|
log_experimentals_ignored.insert(optarg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Run '%s -h' for help.\n", argv[0]);
|
fprintf(stderr, "Run '%s -h' for help.\n", argv[0]);
|
||||||
|
@ -573,6 +573,10 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (log_warnings_count)
|
if (log_warnings_count)
|
||||||
log("Warnings: %d unique messages, %d total\n", GetSize(log_warnings), log_warnings_count);
|
log("Warnings: %d unique messages, %d total\n", GetSize(log_warnings), log_warnings_count);
|
||||||
|
|
||||||
|
if (!log_experimentals.empty())
|
||||||
|
log("Warnings: %d experimental features used (not excluded with -x).\n", GetSize(log_experimentals));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
log("End of script. Logfile hash: %s\n", hash.c_str());
|
log("End of script. Logfile hash: %s\n", hash.c_str());
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -42,7 +42,7 @@ std::vector<FILE*> log_files;
|
||||||
std::vector<std::ostream*> log_streams;
|
std::vector<std::ostream*> log_streams;
|
||||||
std::map<std::string, std::set<std::string>> log_hdump;
|
std::map<std::string, std::set<std::string>> log_hdump;
|
||||||
std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
|
std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
|
||||||
std::set<std::string> log_warnings, log_experimentals;
|
std::set<std::string> log_warnings, log_experimentals, log_experimentals_ignored;
|
||||||
int log_warnings_count = 0;
|
int log_warnings_count = 0;
|
||||||
bool log_hdump_all = false;
|
bool log_hdump_all = false;
|
||||||
FILE *log_errfile = NULL;
|
FILE *log_errfile = NULL;
|
||||||
|
@ -384,7 +384,7 @@ void log_experimental(const char *format, ...)
|
||||||
string s = vstringf(format, ap);
|
string s = vstringf(format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
if (log_experimentals.count(s) == 0) {
|
if (log_experimentals_ignored.count(s) == 0 && log_experimentals.count(s) == 0) {
|
||||||
log_warning("Feature '%s' is experimental.\n", s.c_str());
|
log_warning("Feature '%s' is experimental.\n", s.c_str());
|
||||||
log_experimentals.insert(s);
|
log_experimentals.insert(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ extern std::vector<FILE*> log_files;
|
||||||
extern std::vector<std::ostream*> log_streams;
|
extern std::vector<std::ostream*> log_streams;
|
||||||
extern std::map<std::string, std::set<std::string>> log_hdump;
|
extern std::map<std::string, std::set<std::string>> log_hdump;
|
||||||
extern std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
|
extern std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
|
||||||
extern std::set<std::string> log_warnings, log_experimentals;
|
extern std::set<std::string> log_warnings, log_experimentals, log_experimentals_ignored;
|
||||||
extern int log_warnings_count;
|
extern int log_warnings_count;
|
||||||
extern bool log_hdump_all;
|
extern bool log_hdump_all;
|
||||||
extern FILE *log_errfile;
|
extern FILE *log_errfile;
|
||||||
|
|
Loading…
Reference in New Issue