options: Make --help= see overridden values

Options "-Q --help=params" don't show the final values after
target option overriding, instead it emits the default values
in params.opt (without any explicit param settings).

This patch makes it see overridden values.

gcc/ChangeLog:

	* opts-global.c (decode_options): Call target_option_override_hook
	before it prints for --help=*.
This commit is contained in:
Kewen Lin 2020-08-18 21:37:39 -05:00
parent 623bc02768
commit a7bbb5b1b1

View File

@ -327,8 +327,14 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set,
unsigned i;
const char *arg;
FOR_EACH_VEC_ELT (help_option_arguments, i, arg)
print_help (opts, lang_mask, arg);
if (!help_option_arguments.is_empty ())
{
/* Make sure --help=* sees the overridden values. */
target_option_override_hook ();
FOR_EACH_VEC_ELT (help_option_arguments, i, arg)
print_help (opts, lang_mask, arg);
}
}
/* Hold command-line options associated with stack limitation. */