mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-22 20:32:07 +00:00
Add "yosys -e regex" for turning warnings into errors
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
47eb150eec
commit
5c03aeac60
3 changed files with 22 additions and 4 deletions
|
@ -255,9 +255,13 @@ int main(int argc, char **argv)
|
|||
printf(" print a warning for all log messages matching the regex.\n");
|
||||
printf("\n");
|
||||
printf(" -w regex\n");
|
||||
printf(" if a warning message matches the regex, it is printes as regular\n");
|
||||
printf(" if a warning message matches the regex, it is printed as regular\n");
|
||||
printf(" message instead.\n");
|
||||
printf("\n");
|
||||
printf(" -e regex\n");
|
||||
printf(" if a warning message matches the regex, it is printed as error\n");
|
||||
printf(" message instead and the tool terminates with a nonzero return code.\n");
|
||||
printf("\n");
|
||||
printf(" -E <depsfile>\n");
|
||||
printf(" write a Makefile dependencies file with in- and output file names\n");
|
||||
printf("\n");
|
||||
|
@ -281,7 +285,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:L:qv:tds:c:W:w:D:E:")) != -1)
|
||||
while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:L:qv:tds:c:W:w:e:D:E:")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
|
@ -375,6 +379,12 @@ int main(int argc, char **argv)
|
|||
std::regex_constants::optimize |
|
||||
std::regex_constants::egrep));
|
||||
break;
|
||||
case 'e':
|
||||
log_werror_regexes.push_back(std::regex(optarg,
|
||||
std::regex_constants::nosubs |
|
||||
std::regex_constants::optimize |
|
||||
std::regex_constants::egrep));
|
||||
break;
|
||||
case 'D':
|
||||
{
|
||||
auto args = split_tokens(optarg, ":");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue