Message ID | c68ff25a-1620-3f7e-0722-26f561fc88d0@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [v2] options: Make --help= to emit values post-overrided | expand |
"Kewen.Lin" <linkw@linux.ibm.com> writes: > * opts-global.c (decode_options): Call target_option_override_hook > before it prints for --help=*. OK, thanks. Richard > diff --git a/gcc/opts-global.c b/gcc/opts-global.c > index b1a8429dc3c..69fe2b4f3b1 100644 > --- a/gcc/opts-global.c > +++ b/gcc/opts-global.c > @@ -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=* see 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. */
diff --git a/gcc/opts-global.c b/gcc/opts-global.c index b1a8429dc3c..69fe2b4f3b1 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -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=* see 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. */