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:
Marc Chevrier
2023-12-02 14:26:42 +01:00
parent 6e7a1b5b8c
commit 0502b345f2
3 changed files with 11 additions and 5 deletions

View File

@@ -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``.

View File

@@ -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")

View File

@@ -0,0 +1 @@
include(Platform/Linux-GNU-Fortran)