macOS: add -arch option to allow to bootstrap tcc with tcc on macOS.
This commit is contained in:
parent
dda95e9b0b
commit
a951dc026f
2 changed files with 9 additions and 1 deletions
7
libtcc.c
7
libtcc.c
|
@ -1486,7 +1486,8 @@ enum {
|
|||
TCC_OPTION_x,
|
||||
TCC_OPTION_ar,
|
||||
TCC_OPTION_impdef,
|
||||
TCC_OPTION_C
|
||||
TCC_OPTION_C,
|
||||
TCC_OPTION_arch
|
||||
};
|
||||
|
||||
#define TCC_OPTION_HAS_ARG 0x0001
|
||||
|
@ -1557,6 +1558,9 @@ static const TCCOption tcc_options[] = {
|
|||
#ifdef TCC_TARGET_PE
|
||||
{ "impdef", TCC_OPTION_impdef, 0},
|
||||
#endif
|
||||
//#ifdef TCC_TARGET_MACHO
|
||||
{ "arch", TCC_OPTION_arch, TCC_OPTION_HAS_ARG },
|
||||
//#endif
|
||||
{ "C", TCC_OPTION_C, 0},
|
||||
{ NULL, 0, 0 },
|
||||
};
|
||||
|
@ -1992,6 +1996,7 @@ reparse:
|
|||
case TCC_OPTION_pipe:
|
||||
case TCC_OPTION_s:
|
||||
case TCC_OPTION_C:
|
||||
case TCC_OPTION_arch:
|
||||
/* ignored */
|
||||
break;
|
||||
default:
|
||||
|
|
3
tcc.c
3
tcc.c
|
@ -77,6 +77,9 @@ static const char help[] =
|
|||
" -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
|
||||
#if defined(TCC_TARGET_MACHO) || defined(TCC_TARGET_X86_64)
|
||||
" -arch set macos target achitecture (ignored, always x86_64)\n"
|
||||
#endif
|
||||
"Tools:\n"
|
||||
" create library : tcc -ar [rcsv] lib.a files\n"
|
||||
|
|
Loading…
Reference in a new issue