iverilog: when using '-V' option return immediatly after printing

This avoids a runtime failure not finding vvp.conf file.
This commit is contained in:
Ralf Habacker 2026-05-12 22:49:44 +02:00
parent 04c373c436
commit 32a7e92702
1 changed files with 7 additions and 6 deletions

View File

@ -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" : "");