diff options
author | Martin Liska <mliska@suse.cz> | 2019-11-12 11:07:37 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-11-12 10:07:37 +0000 |
commit | 76c26af90ea3af7487e701e451a4591a81727e8a (patch) | |
tree | f06db17114922ff30c4c817dbb00a5852f3b043e /gcc/opts-common.c | |
parent | 62aee289e4791fd68aace01accf433fb26b3eeae (diff) |
Param to options conversion.
2019-11-12 Martin Liska <mliska@suse.cz>
* common.opt: Remove --param and --param= options.
* opt-functions.awk: Mark CL_PARAMS for options
that have Param keyword.
* opts-common.c (decode_cmdline_options_to_array):
Replace --param key=value with --param=key=value.
* opts.c (print_filtered_help): Remove special
printing of params.
(print_specific_help): Update title for params.
(common_handle_option): Do not handle OPT__param.
opts.h (SET_OPTION_IF_UNSET): New macro.
* doc/options.texi: Document Param keyword.
From-SVN: r278083
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r-- | gcc/opts-common.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c index b4ec1bd25ac..d55dc93e165 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -961,6 +961,15 @@ decode_cmdline_options_to_array (unsigned int argc, const char **argv, continue; } + /* Interpret "--param" "key=name" as "--param=key=name". */ + const char *needle = "--param"; + if (i + 1 < argc && strcmp (opt, needle) == 0) + { + const char *replacement + = opts_concat (needle, "=", argv[i + 1], NULL); + argv[++i] = replacement; + } + n = decode_cmdline_option (argv + i, lang_mask, &opt_array[num_decoded_options]); num_decoded_options++; |