Skip to content

Commit

Permalink
Added more info about removing lib info.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker committed Jan 14, 2025
1 parent 4e7198b commit 1b22d98
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Documentation/source/advanced_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1b22d98

Please sign in to comment.