@@ -272,7 +272,8 @@ struct cl_option_handler_func
272272 const struct cl_decoded_option * decoded ,
273273 unsigned int lang_mask , int kind , location_t loc ,
274274 const struct cl_option_handlers * handlers ,
275- diagnostic_context * dc );
275+ diagnostic_context * dc ,
276+ void (* target_option_override_hook ) (void ));
276277
277278 /* The mask that must have some bit in common with the flags for the
278279 option for this particular handler to be used. */
@@ -294,6 +295,9 @@ struct cl_option_handlers
294295 void (* wrong_lang_callback ) (const struct cl_decoded_option * decoded ,
295296 unsigned int lang_mask );
296297
298+ /* Target option override hook. */
299+ void (* target_option_override_hook ) (void );
300+
297301 /* The number of individual handlers. */
298302 size_t num_handlers ;
299303
@@ -338,13 +342,15 @@ extern void decode_cmdline_options_to_array_default_mask (unsigned int argc,
338342 const char * * argv ,
339343 struct cl_decoded_option * * decoded_options ,
340344 unsigned int * decoded_options_count );
341- extern void set_default_handlers (struct cl_option_handlers * handlers );
345+ extern void set_default_handlers (struct cl_option_handlers * handlers ,
346+ void (* target_option_override_hook ) (void ));
342347extern void decode_options (struct gcc_options * opts ,
343348 struct gcc_options * opts_set ,
344349 struct cl_decoded_option * decoded_options ,
345350 unsigned int decoded_options_count ,
346351 location_t loc ,
347- diagnostic_context * dc );
352+ diagnostic_context * dc ,
353+ void (* target_option_override_hook ) (void ));
348354extern int option_enabled (int opt_idx , void * opts );
349355extern bool get_option_state (struct gcc_options * , int ,
350356 struct cl_option_state * );
@@ -391,14 +397,16 @@ extern bool common_handle_option (struct gcc_options *opts,
391397 unsigned int lang_mask , int kind ,
392398 location_t loc ,
393399 const struct cl_option_handlers * handlers ,
394- diagnostic_context * dc );
400+ diagnostic_context * dc ,
401+ void (* target_option_override_hook ) (void ));
395402extern bool target_handle_option (struct gcc_options * opts ,
396403 struct gcc_options * opts_set ,
397404 const struct cl_decoded_option * decoded ,
398405 unsigned int lang_mask , int kind ,
399406 location_t loc ,
400407 const struct cl_option_handlers * handlers ,
401- diagnostic_context * dc );
408+ diagnostic_context * dc ,
409+ void (* target_option_override_hook ) (void ));
402410extern void finish_options (struct gcc_options * opts ,
403411 struct gcc_options * opts_set ,
404412 location_t loc );
0 commit comments