Rework help messages: split --version -v and -vv, display -m32/64 only when available on current plateform.

This commit is contained in:
Christian Jullien 2020-05-11 16:23:48 +02:00
parent 9c28349757
commit 92236bfe1d

69
tcc.c
View File

@ -29,48 +29,51 @@ static const char help[] =
"Usage: tcc [options...] [-o outfile] [-c] infile(s)...\n" "Usage: tcc [options...] [-o outfile] [-c] infile(s)...\n"
" tcc [options...] -run infile [arguments...]\n" " tcc [options...] -run infile [arguments...]\n"
"General options:\n" "General options:\n"
" -c compile only - generate an object file\n" " -c compile only - generate an object file\n"
" -o outfile set output filename\n" " -o outfile set output filename\n"
" -run run compiled source\n" " -run run compiled source\n"
" -fflag set or reset (with 'no-' prefix) 'flag' (see tcc -hh)\n" " -fflag set or reset (with 'no-' prefix) 'flag' (see tcc -hh)\n"
" -std=c99 Conform to the ISO 1999 C standard (default).\n" " -std=c99 Conform to the ISO 1999 C standard (default).\n"
" -std=c11 Conform to the ISO 2011 C standard.\n" " -std=c11 Conform to the ISO 2011 C standard.\n"
" -Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)\n" " -Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)\n"
" -w disable all warnings\n" " -w disable all warnings\n"
" -v -vv show version, show search paths or loaded files\n" " --version -v show version\n"
" -h -hh show this, show more help\n" " -vv show search paths or loaded files\n"
" -bench show compilation statistics\n" " -h -hh show this, show more help\n"
" - use stdin pipe as infile\n" " -bench show compilation statistics\n"
" @listfile read arguments from listfile\n" " - use stdin pipe as infile\n"
" @listfile read arguments from listfile\n"
"Preprocessor options:\n" "Preprocessor options:\n"
" -Idir add include path 'dir'\n" " -Idir add include path 'dir'\n"
" -Dsym[=val] define 'sym' with value 'val'\n" " -Dsym[=val] define 'sym' with value 'val'\n"
" -Usym undefine 'sym'\n" " -Usym undefine 'sym'\n"
" -E preprocess only\n" " -E preprocess only\n"
"Linker options:\n" "Linker options:\n"
" -Ldir add library path 'dir'\n" " -Ldir add library path 'dir'\n"
" -llib link with dynamic or static library 'lib'\n" " -llib link with dynamic or static library 'lib'\n"
" -r generate (relocatable) object file\n" " -r generate (relocatable) object file\n"
" -shared generate a shared library/dll\n" " -shared generate a shared library/dll\n"
" -rdynamic export all global symbols to dynamic linker\n" " -rdynamic export all global symbols to dynamic linker\n"
" -soname set name for shared library to be used at runtime\n" " -soname set name for shared library to be used at runtime\n"
" -Wl,-opt[=val] set linker option (see tcc -hh)\n" " -Wl,-opt[=val] set linker option (see tcc -hh)\n"
"Debugger options:\n" "Debugger options:\n"
" -g generate runtime debug info\n" " -g generate runtime debug info\n"
#ifdef CONFIG_TCC_BCHECK #ifdef CONFIG_TCC_BCHECK
" -b compile with built-in memory and bounds checker (implies -g)\n" " -b compile with built-in memory and bounds checker (implies -g)\n"
#endif #endif
#ifdef CONFIG_TCC_BACKTRACE #ifdef CONFIG_TCC_BACKTRACE
" -bt[N] link with backtrace (stack dump) support [show max N callers]\n" " -bt[N] link with backtrace (stack dump) support [show max N callers]\n"
#endif #endif
"Misc. options:\n" "Misc. options:\n"
" -x[c|a|b|n] specify type of the next infile (C,ASM,BIN,NONE)\n" " -x[c|a|b|n] specify type of the next infile (C,ASM,BIN,NONE)\n"
" -nostdinc do not use standard system include paths\n" " -nostdinc do not use standard system include paths\n"
" -nostdlib do not link with standard crt and libraries\n" " -nostdlib do not link with standard crt and libraries\n"
" -Bdir set tcc's private include/library dir\n" " -Bdir set tcc's private include/library dir\n"
" -MD generate dependency file for make\n" " -MD generate dependency file for make\n"
" -MF file specify dependency file name\n" " -MF file specify dependency file name\n"
" -m32/64 defer to i386/x86_64 cross compiler\n" #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64)
" -m32/64 defer to i386/x86_64 cross compiler\n"
#endif
"Tools:\n" "Tools:\n"
" create library : tcc -ar [rcsv] lib.a files\n" " create library : tcc -ar [rcsv] lib.a files\n"
#ifdef TCC_TARGET_PE #ifdef TCC_TARGET_PE