diff --git a/Documentation/source/advanced_config.rst b/Documentation/source/advanced_config.rst index dd83e456..9fa0f5df 100644 --- a/Documentation/source/advanced_config.rst +++ b/Documentation/source/advanced_config.rst @@ -217,7 +217,19 @@ the application only needs to specify the name of the libraries required, e.g.: link_exe(state, libs=["yaxt", "xios"]) -The linker will then use the specified linking options. +The linker will then use the specified options. Library definitions can +also be removed: + +.. code-block:: + :linenos: + + tr = ToolRepository() + linker = tr.get_tool(Category.LINKER, "linker-ifort") + + linker.remove_lib_flags("yaxt") + +Note that if a linker has no information for the specified library name, i.e. +the definition was never added, no error will be raised when removing it. A linker object also allows to define options that should always be added, either as options before any library details, or at the very end. For example: