History

Accept -Wp,args

These are preprocessor cmdline arguments, but even in GCC they aren't specified but rather left as being subject to changes. Nobody should use them, but let's to a half-assed attempt at accepting them.

Michael Matz committed 10 years ago

Commit b6799cc1 parent 2b3c7d21 file · +6 −0Browse files

Unified · Split

libtcc.c+6−0
@@ -1511,6 +1511,7 @@ enum { · 1510 unmodified lines
15111511 TCC_OPTION_s,
15121512 TCC_OPTION_traditional,
15131513 TCC_OPTION_Wl,
1514+ TCC_OPTION_Wp,
15141515 TCC_OPTION_W,
15151516 TCC_OPTION_O,
15161517 TCC_OPTION_mms_bitfields,
@@ -1578,6 +1579,7 @@ static const TCCOption tcc_options[] = { · 61 unmodified lines
15781579 { "s", TCC_OPTION_s, 0 },
15791580 { "traditional", TCC_OPTION_traditional, 0 },
15801581 { "Wl,", TCC_OPTION_Wl, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
1582+ { "Wp,", TCC_OPTION_Wp, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
15811583 { "W", TCC_OPTION_W, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
15821584 { "O", TCC_OPTION_O, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
15831585 { "mms-bitfields", TCC_OPTION_mms_bitfields, 0}, /* must go before option 'm' */
@@ -1651,6 +1653,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 67 unmodified lines
16511653
16521654 r = argv[optind++];
16531655
1656+reparse:
16541657 if (r[0] == '@' && r[1] != '\0') {
16551658 args_parser_listfile(s, r + 1);
16561659 continue;
@@ -1840,6 +1843,9 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 183 unmodified lines
18401843 if (tcc_set_linker(s, linker_arg.data))
18411844 cstr_free(&linker_arg);
18421845 break;
1846+ case TCC_OPTION_Wp:
1847+ r = optarg;
1848+ goto reparse;
18431849 case TCC_OPTION_E:
18441850 x = TCC_OUTPUT_PREPROCESS;
18451851 goto set_output_type;

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