With '-i', don't return an error when there are no top-level modules.

The '-i' option is there to allow the compiler to be used to check an
incomplete design for errors. With no top-level modules, nothing will
be elaborated, but at least will be checked for syntax errors.
This commit is contained in:
Martin Whitaker 2019-09-23 20:05:03 +01:00
parent 791c056b77
commit abd63e80e1
1 changed files with 2 additions and 2 deletions

View File

@ -735,7 +735,7 @@ static void read_iconfig_file(const char*ipath)
break;
}
} else if (strcmp(buf, "ignore_missing_modules") == 0) {
} else if (strcmp(buf, "ignore_missing_modules") == 0) {
if (strcmp(cp, "true") == 0)
ignore_missing_modules = true;
@ -1174,7 +1174,7 @@ int main(int argc, char*argv[])
if (roots.empty()) {
cerr << "No top level modules, and no -s option." << endl;
return 1;
return ignore_missing_modules ? 0 : 1;
}