Accessing result data of target options without Mask or Var properties

Joseph Myers
Mon Jul 13 16:13:19 GMT 2020

On Sat, 11 Jul 2020, The Other via Gcc wrote:

> Hi,
> How would I access the result data of target options that don't have Mask
> or Var properties? For example, how would I access the result ISA string in
> the -march option for the RISC-V target?

If an option doesn't specify somewhere to store the argument, that means 
all the processing of that option is expected to be done in the option 
handler.  In this case, riscv_handle_option has an OPT_march_: case.  
Code running later in the compiler is then expected to get whatever 
information it needs from wherever riscv_handle_option (which calls 
riscv_parse_arch_string) stored the results of its processing.

Joseph S. Myers

More information about the Gcc mailing list