diff --git a/docs/CompilerDriver.html b/docs/CompilerDriver.html index 977bd470c68..fc687f16675 100644 --- a/docs/CompilerDriver.html +++ b/docs/CompilerDriver.html @@ -263,38 +263,50 @@ separate option groups syntactically.
Possible option types:
-
- switch_option - a simple boolean switch without arguments, -for example -O2 or -time.
-- parameter_option - option that takes one argument, for -example -std=c99. It is also allowed to use spaces instead of -the equality sign: -std c99.
-- parameter_list_option - same as the above, but more than one -option occurence is allowed.
-- prefix_option - same as the parameter_option, but the option -name and argument do not have to be separated. Example: --ofile. This can be also specified as -o file; however, --o=file will be parsed incorrectly (=file will be -interpreted as option value).
-- prefix_list_option - same as the above, but more than one -occurence of the option is allowed; example: -lm -lpthread.
-- alias_option - a special option type for creating -aliases. Unlike other option types, aliases are not allowed to -have any properties besides the aliased option name. Usage -example: (alias_option "preprocess", "E")
+- switch_option - a simple boolean switch without arguments, for example +-O2 or -time. At most one occurrence is allowed.
+- parameter_option - option that takes one argument, for example +-std=c99. It is also allowed to use spaces instead of the equality +sign: -std c99. At most one occurrence is allowed.
+- parameter_list_option - same as the above, but more than one option +occurence is allowed.
+- prefix_option - same as the parameter_option, but the option name and +argument do not have to be separated. Example: -ofile. This can be also +specified as -o file; however, -o=file will be parsed incorrectly +(=file will be interpreted as option value). At most one occurrence is +allowed.
+- prefix_list_option - same as the above, but more than one occurence of +the option is allowed; example: -lm -lpthread.
+- alias_option - a special option type for creating aliases. Unlike other +option types, aliases are not allowed to have any properties besides the +aliased option name. Usage example: (alias_option "preprocess", "E")
Possible option properties:
@@ -526,16 +538,21 @@ output languages should match. This is enforced at compile-time.-
- help - help string associated with this option. Used for ---help output.
-- required - this option is obligatory.
+- help - help string associated with this option. Used for --help +output.
+- required - this option must be specified exactly once (or, in case of +the list options without the multi_val property, at least +once). Incompatible with zero_or_one and one_or_more.
+- one_or_more - the option must be specified at least one time. Useful +only for list options in conjunction with multi_val; for ordinary lists +it is synonymous with required. Incompatible with required and +zero_or_one.
+- zero_or_one - the option can be specified zero or one times. Useful +only for list options in conjunction with multi_val. Incompatible with +required and one_or_more.
- hidden - the description of this option will not appear in the --help output (but will appear in the --help-hidden output).
- really_hidden - the option will not be mentioned in any help output.
+- multi_val n - this option takes n arguments (can be useful in some +special cases). Usage example: (parameter_list_option "foo", (multi_val +3)). Only list options can have this attribute; you can, however, use +the one_or_more and zero_or_one properties.
- extern - this option is defined in some other plugin, see below.
Normally, LLVMC executes programs from the system PATH. Sometimes, -this is not sufficient: for example, we may want to specify tool names -in the configuration file. This can be achieved via the mechanism of -hooks - to write your own hooks, just add their definitions to the -PluginMain.cpp or drop a .cpp file into the -$LLVMC_DIR/driver directory. Hooks should live in the hooks -namespace and have the signature std::string hooks::MyHookName -(void). They can be used from the cmd_line tool property:
+this is not sufficient: for example, we may want to specify tool paths +or names in the configuration file. This can be easily achieved via +the hooks mechanism. To write your own hooks, just add their +definitions to the PluginMain.cpp or drop a .cpp file into the +your plugin directory. Hooks should live in the hooks namespace +and have the signature std::string hooks::MyHookName ([const char* +Arg0 [ const char* Arg2 [, ...]]]). They can be used from the +cmd_line tool property:(cmd_line "$CALL(MyHook)/path/to/file -o $CALL(AnotherHook)")+
To pass arguments to hooks, use the following syntax:
++(cmd_line "$CALL(MyHook, 'Arg1', 'Arg2', 'Arg # 3')/path/to/file -o1 -o2") +
It is also possible to use environment variables in the same manner:
(cmd_line "$ENV(VAR1)/path/to/file -o $ENV(VAR2)")