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:

  • Possible option properties:

    @@ -526,16 +538,21 @@ output languages should match. This is enforced at compile-time.

    Hooks and environment variables

    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)")