From 92236bfe1d9e5c3d61aaf68c388facd9c25f6cdd Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Mon, 11 May 2020 16:23:48 +0200 Subject: [PATCH] Rework help messages: split --version -v and -vv, display -m32/64 only when available on current plateform. --- tcc.c | 69 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/tcc.c b/tcc.c index 34bfa004..dc95bccc 100644 --- a/tcc.c +++ b/tcc.c @@ -29,48 +29,51 @@ static const char help[] = "Usage: tcc [options...] [-o outfile] [-c] infile(s)...\n" " tcc [options...] -run infile [arguments...]\n" "General options:\n" - " -c compile only - generate an object file\n" - " -o outfile set output filename\n" - " -run run compiled source\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=c11 Conform to the ISO 2011 C standard.\n" - " -Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)\n" - " -w disable all warnings\n" - " -v -vv show version, show search paths or loaded files\n" - " -h -hh show this, show more help\n" - " -bench show compilation statistics\n" - " - use stdin pipe as infile\n" - " @listfile read arguments from listfile\n" + " -c compile only - generate an object file\n" + " -o outfile set output filename\n" + " -run run compiled source\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=c11 Conform to the ISO 2011 C standard.\n" + " -Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)\n" + " -w disable all warnings\n" + " --version -v show version\n" + " -vv show search paths or loaded files\n" + " -h -hh show this, show more help\n" + " -bench show compilation statistics\n" + " - use stdin pipe as infile\n" + " @listfile read arguments from listfile\n" "Preprocessor options:\n" - " -Idir add include path 'dir'\n" - " -Dsym[=val] define 'sym' with value 'val'\n" - " -Usym undefine 'sym'\n" - " -E preprocess only\n" + " -Idir add include path 'dir'\n" + " -Dsym[=val] define 'sym' with value 'val'\n" + " -Usym undefine 'sym'\n" + " -E preprocess only\n" "Linker options:\n" - " -Ldir add library path 'dir'\n" - " -llib link with dynamic or static library 'lib'\n" - " -r generate (relocatable) object file\n" - " -shared generate a shared library/dll\n" - " -rdynamic export all global symbols to dynamic linker\n" - " -soname set name for shared library to be used at runtime\n" + " -Ldir add library path 'dir'\n" + " -llib link with dynamic or static library 'lib'\n" + " -r generate (relocatable) object file\n" + " -shared generate a shared library/dll\n" + " -rdynamic export all global symbols to dynamic linker\n" + " -soname set name for shared library to be used at runtime\n" " -Wl,-opt[=val] set linker option (see tcc -hh)\n" "Debugger options:\n" - " -g generate runtime debug info\n" + " -g generate runtime debug info\n" #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 #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 "Misc. options:\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" - " -nostdlib do not link with standard crt and libraries\n" - " -Bdir set tcc's private include/library dir\n" - " -MD generate dependency file for make\n" - " -MF file specify dependency file name\n" - " -m32/64 defer to i386/x86_64 cross compiler\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" + " -nostdlib do not link with standard crt and libraries\n" + " -Bdir set tcc's private include/library dir\n" + " -MD generate dependency file for make\n" + " -MF file specify dependency file name\n" +#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) + " -m32/64 defer to i386/x86_64 cross compiler\n" +#endif "Tools:\n" " create library : tcc -ar [rcsv] lib.a files\n" #ifdef TCC_TARGET_PE