diff --git a/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst b/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst index d7d028ab80..735375c6bf 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst @@ -6,16 +6,13 @@ CMAKE__COMPILER_LINKER_FRONTEND_VARIANT Identification string of the linker frontend variant. Some linkers have multiple, different frontends for accepting command -line options. (For example ``LLCM LLD`` originally only had a frontend -compatible with the ``GNU`` compiler but since its port to Windows -(``lld-link``) it now also supports a frontend compatible with ``MSVC``.) -When CMake detects such a linker it sets this variable to what would have been +line options. For example, ``LLVM LLD`` originally only had a frontend +compatible with the ``GNU`` compiler, but since its port to Windows +(``lld-link``), it now also supports a frontend compatible with ``MSVC``. +When CMake detects such a linker, it sets this variable to what would have been the :variable:`CMAKE__COMPILER_LINKER_ID` for the linker whose frontend it resembles. .. note:: In other words, this variable describes what command line options and language extensions the linker frontend expects. - - This variable is set for ``GNU``, ``MSVC``, ``MOLD`` and ``AppleClang`` - linkers that have only one frontend variant. diff --git a/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst index 0607aea27f..a57fd33293 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst @@ -17,8 +17,8 @@ Value Name ``bfd``) ``GNUgold`` `GNU Binutils - gold linker`_ ``MSVC`` `Microsoft Visual Studio`_ -``MOLD`` `mold: A Modern Linker`_ or, on Apple, `sold`_ - linker +``MOLD`` `mold: A Modern Linker`_, or on Apple the + `sold`_ linker ``AIX`` AIX system linker ``Solaris`` SunOS system linker =============================== =============================================== diff --git a/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst b/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst index c9b67797a9..66ce26b000 100644 --- a/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst +++ b/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst @@ -3,8 +3,8 @@ CMAKE__USING_LINKER_MODE .. versionadded:: 3.29 -This variable specify what is the type of data stored in variable - :variable:`CMAKE__USING_LINKER_`. There are two possible values: +This controls how the value of the :variable:`CMAKE__USING_LINKER_` +variable should be interpreted. The supported linker mode values are: ``FLAG`` :variable:`CMAKE__USING_LINKER_` holds compiler flags. This is diff --git a/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst b/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst index d4714c32f9..88c03359ce 100644 --- a/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst +++ b/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst @@ -3,32 +3,32 @@ CMAKE__USING_LINKER_ .. versionadded:: 3.29 -This variable defines how to specify the linker for the link step for the type -as specified by the variable :variable:`CMAKE_LINKER_TYPE` or the target -property :prop_tgt:`LINKER_TYPE`. It can hold compiler flags for the link step -or directly the linker tool. The type of data is given by the variable -:variable:`CMAKE__USING_LINKER_MODE`. +This variable defines how to specify the ```` linker for the link step, +as controlled by the :variable:`CMAKE_LINKER_TYPE` variable or the +:prop_tgt:`LINKER_TYPE` target property. Depending on the value of the +:variable:`CMAKE__USING_LINKER_MODE` variable, +``CMAKE__USING_LINKER_`` can hold compiler flags for the link step, +or flags to be given directly to the linker tool. .. note:: - The specified linker tool is expected to be accessible through - the ``PATH`` environment variable, particularly when the - :variable:`CMAKE__USING_LINKER_MODE` variable is set to ``FLAG``. + The specified linker tool is generally expected to be accessible through + the ``PATH`` environment variable. -For example, to specify the ``LLVM`` linker for ``GNU`` compilers, we have: +For example, the ``LLD`` linker for ``GNU`` compilers is defined like so: .. code-block:: cmake set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld") -Or on ``Windows`` platform, for ``Clang`` compilers simulating ``MSVC``, we -have: +On the ``Windows`` platform with ``Clang`` compilers simulating ``MSVC``: .. code-block:: cmake set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld-link") -And for the ``MSVC`` compiler, linker is directly used, so we have: +And for the ``MSVC`` compiler, the linker is invoked directly, not via the +compiler frontend: .. code-block:: cmake diff --git a/Help/variable/CMAKE_LINKER_TYPE.rst b/Help/variable/CMAKE_LINKER_TYPE.rst index 17ea947bba..ac72c38954 100644 --- a/Help/variable/CMAKE_LINKER_TYPE.rst +++ b/Help/variable/CMAKE_LINKER_TYPE.rst @@ -9,10 +9,10 @@ Specify which linker will be used for the link step. It is assumed that the linker specified is fully compatible with the standard one. CMake will not do any options translation. -This variable is used to initialize the :prop_tgt:`LINKER_TYPE` target -property when they are created by calls to :command:`add_library` or -:command:`add_executable` commands. It is meaningful only for targets having a -link step. If set, its value is also used by the :command:`try_compile` +This variable is used to initialize the :prop_tgt:`LINKER_TYPE` property +on each target created by a call to :command:`add_library` or +:command:`add_executable`. It is meaningful only for targets having a +link step. If set, its value is also used by the :command:`try_compile` command. .. include:: LINKER_PREDEFINED_TYPES.txt