Next:Option properties, Up:Option specification files [Contents][Index]
Option files are a simple list of records in which each field occupiesits own line and in which the records themselves are separated byblank lines. Comments may appear on their own line anywhere withinthe file and are preceded by semicolons. Whitespace is allowed beforethe semicolon.
The files can contain the following types of record:
cl_target_option structure.Var properties.gcc_options structure, but these variables are also stored inthecl_target_option structure. The variables are saved in thetarget save code and restored in the target restore code.#ifdefsequences to properly set up the initialization. These records havetwo fields: the string ‘SourceInclude’ and the name of theinclude file.Name(name)This property is required;name must be a name (suitable for usein C identifiers) used to identify the set of strings inEnumoption properties.
Type(type)This property is required;type is the C type for variables setby options using this enumeration together withVar.
UnknownError(message)The messagemessage will be used as an error message if theargument is invalid; for enumerations withoutUnknownError, ageneric error message is used.message should contain a single‘%qs’ format, which will be used to format the invalid argument.
Enum(name)This property is required;name says which ‘Enum’ recordthis ‘EnumValue’ record corresponds to.
String(string)This property is required;string is the string option argumentbeing described by this record.
Value(value)This property is required; it says what value (representable asint) should be used for the given string.
CanonicalThis property is optional. If present, it says the present string isthe canonical one among all those with the given value. Other stringsyielding that value will be mapped to this one so specs do not need tohandle them.
DriverOnlyThis property is optional. If present, the present string will onlybe accepted by the driver. This is used for cases such as-march=native that are processed by the driver so that‘gcc -v’ shows how the options chosen depended on the system onwhich the compiler was run.
Set(number)This property is optional, required for enumerations used inEnumSet options.number should be decimal number between1 and 64 inclusive and divides the enumeration into a set ofsets of mutually exclusive arguments. Arguments with the samenumber can’t be specified together in the same option, butarguments with differentnumber can.value needs to bechosen such that a mask of allvalue values from the same setnumber bitwise ored doesn’t overlap with masks for other sets.When-foption=arg_from_set1,arg_from_set4 and-fno-option=arg_from_set3 are used, the effect is that previousvalue of theVar will get bits from set 1 and 4 masks cleared,oredValue ofarg_from_set1 andarg_from_set4and then will get bits from set 3 mask cleared.
Undocumented property).By default, all options beginning with “f”, “g”, “W” or “m” areimplicitly assumed to take a “no-” form. This form should not belisted separately. If an option beginning with one of these lettersdoes not have a “no-” form, you can use theRejectNegativeproperty to reject it.
The help text is automatically line-wrapped before being displayed.Normally the name of the option is printed on the left-hand side ofthe output and the help text is printed on the right. However, if thehelp text contains a tab character, the text to the left of the tab isused instead of the option’s name and the text to the right of thetab forms the help text. This allows you to elaborate on what typeof argument the option takes.
There is no support for different help texts for different languages.If an option is supported for multiple languages, use a genericdescription that is correct for all of them.
If an option has multiple option definition records (in differentfront ends’*.opt files, and/orgcc/common.opt, forexample), convention is to not duplicate the help text for each ofthem, but instead put a comment like; documented in common.optin place of the help text for all but one of the multiple optiondefinition records.
target_flags (seeRun-time Target Specification) foreach mask namex and set the macroMASK_x to theappropriate bitmask. It will also declare aTARGET_xmacro that has the value 1 when bitMASK_x is set and0 otherwise.They are primarily intended to declare target masks that are notassociated with user options, either because these masks representinternal switches or because the options are not available on allconfigurations and yet the masks always need to be defined.
Next:Option properties, Up:Option specification files [Contents][Index]