Skip to content

Commit

Permalink
Remove internal debug and deprecated options from --help
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Aug 4, 2024
1 parent 590662b commit d455102
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 50 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
manual for details.
- The argument to the `--cover-export` command is now the path to a
coverage database file instead of a top-level unit name.
- The `--force-init` command which was deprecated in the 1.7 release has
been removed.

## Version 1.13.1 - 2024-07-25
- Windows installer was missing some standard library files.
Expand Down
12 changes: 0 additions & 12 deletions nvc.1
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ Merge multiple coverage databases into a single database.
.\" --cover-report
.It Fl \-cover-report Ar
Generate an HTML report from a coverage database.
.\" --dump
.It Fl \-dump Ar unit
Print out a pseudo-VHDL representation of an analysed unit. This is
usually only useful for debugging the compiler.
.\" --init
.It Fl \-init
Initialise the working library directory. This is not normally
Expand Down Expand Up @@ -248,14 +244,6 @@ coverage specification file
.Sx CODE COVERAGE
section below).
.\"
.It Fl \-dump-llvm
Write generated LLVM IR to the work library directory before and after
optimisation.
.\"
.It Fl \-dump-vcode
Print generated intermediate code. This is only useful for debugging
the compiler.
.\"
.It Fl g Ar name Ns = Ns Ar value
Override generic
.Ar name
Expand Down
44 changes: 9 additions & 35 deletions src/nvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ static int run_cmd(int argc, char **argv, cmd_state_t *state)
{
static struct option long_options[] = {
{ "trace", no_argument, 0, 't' },
{ "profile", no_argument, 0, 'p' },
{ "profile", no_argument, 0, 'p' }, // DEPRECATED 1.14
{ "stop-time", required_argument, 0, 's' },
{ "stats", no_argument, 0, 'S' },
{ "wave", optional_argument, 0, 'w' },
Expand Down Expand Up @@ -693,7 +693,7 @@ static int run_cmd(int argc, char **argv, cmd_state_t *state)
opt_set_int(OPT_RT_TRACE, 1);
break;
case 'p':
opt_set_int(OPT_RT_PROFILE, 1);
warnf("the $bold$--profile$$ option is deprecated and has no effect");
break;
case 'T':
opt_set_str(OPT_VHPI_TRACE, "1");
Expand Down Expand Up @@ -1869,7 +1869,6 @@ static void usage(void)
"Generate HTML report from coverage database\n"
" --cover-merge FILE...\t\tMerge multiple coverage databases\n"
" --do SCRIPT\t\t\tEvaluate TCL script\n"
" --dump [OPTION]... UNIT\tPrint out previously analysed UNIT\n"
#ifdef ENABLE_GUI
" --gui\t\t\t\tLaunch browser-based GUI\n"
#endif
Expand All @@ -1890,7 +1889,6 @@ static void usage(void)
" -M SIZE\t\tLimit design unit heap space to SIZE bytes\n"
" --map=LIB:PATH\tMap library LIB to PATH\n"
" --messages=STYLE\tSelect full or compact message format\n"
" --native\t\tGenerate native code shared library\n"
" --std=REV\t\tVHDL standard revision to use\n"
" --stderr=SEV\tPrint messages higher than SEV to stderr\n"
" -v, --version\t\tDisplay version and copyright information\n"
Expand All @@ -1905,16 +1903,9 @@ static void usage(void)
" --relaxed\t\tDisable certain pedantic rule checks\n"
"\n"
"Elaboration options:\n"
" --cover[=TYPES]\tEnable code coverage collection. TYPES is a\n"
" \tcomma separated list of coverage types to "
"collect:\n"
" \t statement\n"
" \t toggle\n"
" \t branch\n"
" \t expression\n"
" \tOmitting TYPES collects all coverage types.\n"
" --dump-llvm\tDump generated LLVM IR\n"
" --dump-vcode\tPrint generated intermediate code\n"
" --cover[=TYPES]\tEnable code coverage collection\n"
" \t"
"Valid TYPES include statement, branch, and toggle\n"
" -g NAME=VALUE\t\tSet top level generic NAME to VALUE\n"
" -j, --jit\t\tEnable just-in-time compilation during simulation\n"
" --no-collapse\tDo not collapse multiple signals into one\n"
Expand All @@ -1929,10 +1920,9 @@ static void usage(void)
"this severity\n"
" --format=FMT\tWaveform format is either fst or vcd\n"
" --ieee-warnings=\tEnable ('on') or disable ('off') warnings\n"
" \t\t\tfrom IEEE packages\n"
" \tfrom IEEE packages\n"
" --include=GLOB\tInclude signals matching GLOB in wave dump\n"
" --load=PLUGIN\tLoad VHPI plugin at startup\n"
" --profile\t\tDisplay detailed statistics at end of run\n"
" --shuffle\t\tRun processes in random order\n"
" --stats\t\tPrint time and memory usage at end of run\n"
" --stop-delta=N\tStop after N delta cycles (default %d)\n"
Expand All @@ -1955,20 +1945,6 @@ static void usage(void)
"Argument is a list of: covered, uncovered, excluded\n"
" -o, --output=DIR\tPlace generated HTML files in DIR\n"
"\n"
"Coverage processing options:\n"
" --merge=OUTPUT\tMerge all input coverage databases from FILEs\n"
" \tto OUTPUT coverage database\n"
" --exclude-file=\tApply exclude file when generating report\n"
" --export=FILE\tEquivalent to `--cover-export -o FILE'\n"
" --dont-print=\tDo not include specified items in generated "
"code\n"
" \tcoverage report. Argument is a list of:\n"
" \t covered\n"
" \t uncovered\n"
" \t excluded\n"
" --report=DIR\tGenerate HTML report with code coverage results\n"
" \tto DIR folder.\n"
"\n"
"Coverage merge options:\n"
" -o, --output=FILE\tOutput database file name\n"
"\n"
Expand All @@ -1977,10 +1953,6 @@ static void usage(void)
" -o, --output=FILE\tOutput file name\n"
" --relative=PATH\tStrip PATH from prefix of absolute paths\n"
"\n"
"Dump options:\n"
" -e, --elab\t\tDump an elaborated unit\n"
" -b, --body\t\tDump package body\n"
"\n"
"Install options:\n"
" --dest=DIR\t\tCompile libraries into directory DEST\n"
"\n",
Expand All @@ -1991,7 +1963,9 @@ static void usage(void)
lib_print_search_paths(tb);
printf("Library search paths:%s\n", tb_get(tb));

printf("\nThe full manual can be read with `man 1 %s'\n", PACKAGE_NAME);
printf("\nThe full manual can be read with `man 1 %s' and contains "
"detailed\nexplanations of the commands and options above as "
"well as examples.\n", PACKAGE_NAME);
printf("\nReport bugs at <%s>\n", PACKAGE_BUGREPORT);
}

Expand Down
1 change: 0 additions & 1 deletion src/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ void set_default_options(void)
opt_set_str(OPT_DUMP_VCODE, getenv("NVC_LOWER_VERBOSE"));
opt_set_int(OPT_IGNORE_TIME, 0);
opt_set_int(OPT_VERBOSE, 0);
opt_set_int(OPT_RT_PROFILE, 0);
opt_set_int(OPT_MISSING_BODY, 1);
opt_set_int(OPT_IEEE_WARNINGS, 1);
opt_set_size(OPT_ARENA_SIZE, 1 << 24);
Expand Down
1 change: 0 additions & 1 deletion src/option.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ typedef enum {
OPT_DUMP_VCODE,
OPT_IGNORE_TIME,
OPT_VERBOSE,
OPT_RT_PROFILE,
OPT_RT_TRACE,
OPT_MISSING_BODY,
OPT_IEEE_WARNINGS,
Expand Down
2 changes: 1 addition & 1 deletion test/regress/cmdline10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ limit=72

if [ "$maxcols" -gt $limit ]; then
echo "FAILED: --help output is too wide!"
awk "length >= $limit { print \$0 }" output
awk "length > $limit { print \$0 }" output
exit 1
fi

0 comments on commit d455102

Please sign in to comment.