Browse Source

Merge topic 'LLVMFlang-Fortran-link-enhancements'

0502b345f2 LLVMFlang Fortran: enhance link capabilities

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9025
Brad King 2 years ago
parent
commit
243f56c8e0

+ 7 - 5
Help/variable/LINKER_PREDEFINED_TYPES.txt

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

+ 3 - 0
Modules/Compiler/LLVMFlang-Fortran.cmake

@@ -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 - 0
Modules/Platform/Linux-LLVMFlang-Fortran.cmake

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