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
1511 TCC_OPTION_s,1511 TCC_OPTION_s,
1512 TCC_OPTION_traditional,1512 TCC_OPTION_traditional,
1513 TCC_OPTION_Wl,1513 TCC_OPTION_Wl,
1514 TCC_OPTION_Wp,
1514 TCC_OPTION_W,1515 TCC_OPTION_W,
1515 TCC_OPTION_O,1516 TCC_OPTION_O,
1516 TCC_OPTION_mms_bitfields,1517 TCC_OPTION_mms_bitfields,
@@ -1578,6 +1579,7 @@ static const TCCOption tcc_options[] = { · 61 unmodified lines
1578 { "s", TCC_OPTION_s, 0 },1579 { "s", TCC_OPTION_s, 0 },
1579 { "traditional", TCC_OPTION_traditional, 0 },1580 { "traditional", TCC_OPTION_traditional, 0 },
1580 { "Wl,", TCC_OPTION_Wl, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },1581 { "Wl,", TCC_OPTION_Wl, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
1582 { "Wp,", TCC_OPTION_Wp, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
1581 { "W", TCC_OPTION_W, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },1583 { "W", TCC_OPTION_W, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
1582 { "O", TCC_OPTION_O, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },1584 { "O", TCC_OPTION_O, TCC_OPTION_HAS_ARG | TCC_OPTION_NOSEP },
1583 { "mms-bitfields", TCC_OPTION_mms_bitfields, 0}, /* must go before option 'm' */1585 { "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
1651 1653
1652 r = argv[optind++];1654 r = argv[optind++];
1653 1655
1656reparse:
1654 if (r[0] == '@' && r[1] != '\0') {1657 if (r[0] == '@' && r[1] != '\0') {
1655 args_parser_listfile(s, r + 1);1658 args_parser_listfile(s, r + 1);
1656 continue;1659 continue;
@@ -1840,6 +1843,9 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 183 unmodified lines
1840 if (tcc_set_linker(s, linker_arg.data))1843 if (tcc_set_linker(s, linker_arg.data))
1841 cstr_free(&linker_arg);1844 cstr_free(&linker_arg);
1842 break;1845 break;
1846 case TCC_OPTION_Wp:
1847 r = optarg;
1848 goto reparse;
1843 case TCC_OPTION_E:1849 case TCC_OPTION_E:
1844 x = TCC_OUTPUT_PREPROCESS;1850 x = TCC_OUTPUT_PREPROCESS;
1845 goto set_output_type;1851 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