From 32a7e92702917c309ebaed6794d6636cb1724726 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 12 May 2026 22:49:44 +0200 Subject: [PATCH] iverilog: when using '-V' option return immediatly after printing This avoids a runtime failure not finding vvp.conf file. --- driver/main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/driver/main.c b/driver/main.c index bda9da0e9..cacd81f22 100644 --- a/driver/main.c +++ b/driver/main.c @@ -1374,6 +1374,13 @@ int main(int argc, char **argv) } } + if (version_flag) { + printf("Icarus Verilog version " VERSION " (" VERSION_TAG ")\n\n"); + printf("%s\n\n", COPYRIGHT); + puts(NOTICE); + return 0; + } + if (strcmp(gen_verilog_ams,"verilog-ams") == 0) fprintf(defines_file, "D:__VAMS_ENABLE__=1\n"); if (synth_flag) @@ -1390,12 +1397,6 @@ int main(int argc, char **argv) if (tconfig_dir == 0) tconfig_dir = base; - if (version_flag || verbose_flag) { - printf("Icarus Verilog version " VERSION " (" VERSION_TAG ")\n\n"); - printf("%s\n\n", COPYRIGHT); - puts(NOTICE); - } - /* Make a common conf file path to reflect the target. */ snprintf(iconfig_common_path, sizeof iconfig_common_path, "%s%c%s%s.conf", tconfig_dir, sep, targ, synth_flag? "-s" : "");