blob: 76927bef1163507c65a851c8f8a846b1f625c182 [file] [log] [blame]
To pass options to the linker tool, each compiler driver has is own syntax.
The ``LINKER:`` prefix can be used to specify, in a portable way, options
to pass to the linker tool. The ``LINKER:`` prefix is replaced by the required
driver option and the rest of the option string defines linker arguments using
``,`` as separator. These arguments will be formatted according to the
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG` and
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP` variables.
For example, ``"LINKER:-z,defs"`` becomes ``-Xlinker -z -Xlinker defs`` for
``Clang`` and ``-Wl,-z,defs`` for ``GNU GCC``.