mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
LLVMFlang Fortran: enhance link capabilities
* Add support for "LINKER:" prefix. * Add support, on Linux, for linker selection through CMAKE_LINKER_TYPE variable.
This commit is contained in:
@@ -11,7 +11,7 @@ built-in types. The pre-defined linker types are:
|
||||
(for example, ``SYSTEM`` imply Microsoft linker for all ``MSVC`` compatible
|
||||
compilers). This type is supported for the following platforms/compilers:
|
||||
|
||||
* Linux, for ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
* Linux, for ``GNU``, ``Clang``, ``LLVMFlang`` and ``NVIDIA`` compilers.
|
||||
* All Apple variants for ``AppleClang``, ``Clang`` and ``GNU`` compilers.
|
||||
* Windows, for ``MSVC``, ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
|
||||
@@ -19,7 +19,7 @@ built-in types. The pre-defined linker types are:
|
||||
Use the ``LLVM`` linker. This type is supported for the following
|
||||
platforms/compilers:
|
||||
|
||||
* Linux, for ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
* Linux, for ``GNU``, ``Clang``, ``LLVMFlang`` and ``NVIDIA`` compilers.
|
||||
* All Apple variants for ``Clang`` and ``AppleClang`` compilers.
|
||||
* Windows, for ``GNU``, ``Clang`` compilers with ``GNU`` front-end and
|
||||
``CLang``, ``MSVC`` and ``NVIDIA`` compilers with ``MSVC`` front-end.
|
||||
@@ -28,17 +28,19 @@ built-in types. The pre-defined linker types are:
|
||||
Use the ``GNU`` linker. This type is supported for the following
|
||||
platforms/compilers:
|
||||
|
||||
* Linux, for ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
* Linux, for ``GNU``, ``Clang``, ``LLVMFlang`` and ``NVIDIA`` compilers.
|
||||
* Windows, for ``GNU``, ``Clang`` compilers with ``GNU`` front-end.
|
||||
|
||||
``GOLD``
|
||||
Supported on Linux platform for ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
Supported on Linux platform for ``GNU``, ``Clang``, ``LLVMFlang`` and
|
||||
``NVIDIA`` compilers.
|
||||
|
||||
``MOLD``
|
||||
Use the `mold linker <https://github.com/rui314/mold>`_. This type is
|
||||
supported on the following platforms:
|
||||
|
||||
* Linux platform for ``GNU``, ``Clang`` and ``NVIDIA`` compilers.
|
||||
* Linux platform for ``GNU``, ``Clang``, ``LLVMFlang`` and ``NVIDIA``
|
||||
compilers.
|
||||
* All Apple variants for ``Clang`` and ``AppleClang`` compilers as an
|
||||
alias to ``SOLD``.
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ set(CMAKE_Fortran_POSTPROCESS_FLAG "-ffixed-line-length-72")
|
||||
|
||||
set(CMAKE_Fortran_COMPILE_OPTIONS_TARGET "--target=")
|
||||
|
||||
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG "-Wl,")
|
||||
set(CMAKE_Fortran_LINKER_WRAPPER_FLAG_SEP ",")
|
||||
|
||||
if(NOT "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||
|
||||
|
||||
1
Modules/Platform/Linux-LLVMFlang-Fortran.cmake
Normal file
1
Modules/Platform/Linux-LLVMFlang-Fortran.cmake
Normal file
@@ -0,0 +1 @@
|
||||
include(Platform/Linux-GNU-Fortran)
|
||||
Reference in New Issue
Block a user