From abd63e80e184c835cb3d8836a78a378900339c3d Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 23 Sep 2019 20:05:03 +0100 Subject: [PATCH] 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. --- main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cc b/main.cc index 290f766a7..938100cca 100644 --- a/main.cc +++ b/main.cc @@ -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; }