History

macOS: add -arch option to allow to bootstrap tcc with tcc on macOS.

Christian Jullien committed 5 years ago

Commit a951dc01 parent dda95e92 files · +9 −1Browse files

Unified · Split

2 files
  1. libtcc.c +6 −1
  2. tcc.c +3 −0
libtcc.c+6−1
@@ -1486,7 +1486,8 @@ enum { · 1485 unmodified lines
14861486 TCC_OPTION_x,
14871487 TCC_OPTION_ar,
14881488 TCC_OPTION_impdef,
1489− TCC_OPTION_C
1489+ TCC_OPTION_C,
1490+ TCC_OPTION_arch
14901491 };
14911492
14921493 #define TCC_OPTION_HAS_ARG 0x0001
@@ -1557,6 +1558,9 @@ static const TCCOption tcc_options[] = { · 64 unmodified lines
15571558 #ifdef TCC_TARGET_PE
15581559 { "impdef", TCC_OPTION_impdef, 0},
15591560 #endif
1561+//#ifdef TCC_TARGET_MACHO
1562+ { "arch", TCC_OPTION_arch, TCC_OPTION_HAS_ARG },
1563+//#endif
15601564 { "C", TCC_OPTION_C, 0},
15611565 { NULL, 0, 0 },
15621566 };
@@ -1992,6 +1996,7 @@ reparse: · 429 unmodified lines
19921996 case TCC_OPTION_pipe:
19931997 case TCC_OPTION_s:
19941998 case TCC_OPTION_C:
1999+ case TCC_OPTION_arch:
19952000 /* ignored */
19962001 break;
19972002 default:
tcc.c+3−0
@@ -77,6 +77,9 @@ static const char help[] = · 76 unmodified lines
7777 " -MF file specify dependency file name\n"
7878 #if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64)
7979 " -m32/64 defer to i386/x86_64 cross compiler\n"
80+#endif
81+#if defined(TCC_TARGET_MACHO) || defined(TCC_TARGET_X86_64)
82+ " -arch set macos target achitecture (ignored, always x86_64)\n"
8083 #endif
8184 "Tools:\n"
8285 " create library : tcc -ar [rcsv] lib.a files\n"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t