Merge topic 'linker-configuration'

1e35163ae8 WHOLE_ARCHIVE link feature: rely now on linker configuration
c1c4cf9545 Linker configuration: introduce a new architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9665
This commit is contained in:
Brad King
2024-07-23 13:56:17 +00:00
committed by Kitware Robot
292 changed files with 2335 additions and 257 deletions

View File

@@ -120,13 +120,4 @@ macro(_cmake_common_language_platform_flags lang)
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
endif()
endforeach()
if(CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
if(NOT DEFINED CMAKE_${lang}_LINK_WHAT_YOU_USE_FLAG)
set(CMAKE_${lang}_LINK_WHAT_YOU_USE_FLAG "LINKER:--no-as-needed")
endif()
if(NOT DEFINED CMAKE_LINK_WHAT_YOU_USE_CHECK)
set(CMAKE_LINK_WHAT_YOU_USE_CHECK ldd -u -r)
endif()
endif()
endmacro()

View File

@@ -34,6 +34,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
endif()
endfunction()
# FIXME(#26157) linker for Intel legacy compilers is not identified
function(cmake_parse_implicit_link_info2 text log_var obj_regex)
set(implicit_libs_tmp "")
set(implicit_objs_tmp "")

View File

@@ -108,15 +108,6 @@ else()
endif()
unset(__SWIFT_COMP_MODE_CMP0157)
if(CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
if(NOT DEFINED CMAKE_Swift_LINK_WHAT_YOU_USE_FLAG)
set(CMAKE_Swift_LINK_WHAT_YOU_USE_FLAG "LINKER:--no-as-needed")
endif()
if(NOT DEFINED CMAKE_LINK_WHAT_YOU_USE_CHECK)
set(CMAKE_LINK_WHAT_YOU_USE_CHECK ldd -u -r)
endif()
endif()
cmake_initialize_per_config_variable(CMAKE_Swift_FLAGS "Swift Compiler Flags")
if(NOT CMAKE_Swift_NUM_THREADS MATCHES "^[0-9]+$")

View File

@@ -52,60 +52,6 @@ macro(__compiler_gnu lang)
set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
endif()
# define flags for linker depfile generation
set(CMAKE_${lang}_LINKER_DEPFILE_FLAGS "LINKER:--dependency-file,<DEP_FILE>")
set(CMAKE_${lang}_LINKER_DEPFILE_FORMAT gcc)
if(NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
## Ensure ninja tool is recent enough...
if(CMAKE_GENERATOR MATCHES "^Ninja")
# Ninja 1.10 or upper is required
execute_process(COMMAND "${CMAKE_MAKE_PROGRAM}" --version
OUTPUT_VARIABLE _ninja_version
ERROR_VARIABLE _ninja_version)
if (_ninja_version MATCHES "[0-9]+(\\.[0-9]+)*")
set (_ninja_version "${CMAKE_MATCH_0}")
endif()
if (_ninja_version VERSION_LESS "1.10")
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
unset(_ninja_version)
endif()
if (NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
## check if this feature is supported by the linker
if (CMAKE_${lang}_COMPILER_LINKER AND CMAKE_${lang}_COMPILER_LINKER_ID MATCHES "GNU|LLD")
execute_process(COMMAND "${CMAKE_${lang}_COMPILER_LINKER}" --help
OUTPUT_VARIABLE _linker_capabilities
ERROR_VARIABLE _linker_capabilities)
if(_linker_capabilities MATCHES "--dependency-file")
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED TRUE)
else()
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
unset(_linker_capabilities)
else()
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
endif()
endif()
if (CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER TRUE)
else()
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
endif()
# Due to GNU binutils ld bug when LTO is enabled (see GNU bug
# `30568 <https://sourceware.org/bugzilla/show_bug.cgi?id=30568>`_),
# deactivate this feature if the version is less than 2.41.
# For now, all known versions of gold linker have also this bug.
if (CMAKE_${lang}_COMPILER_LINKER_ID
AND (CMAKE_${lang}_COMPILER_LINKER_ID STREQUAL "GNUgold"
OR (CMAKE_${lang}_COMPILER_LINKER_ID STREQUAL "GNU"
AND CMAKE_${lang}_COMPILER_LINKER_VERSION VERSION_LESS "2.41")))
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
endif()
# Initial configuration flags.
string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# support for AT&T syntax assemblers, e.g. GNU as
# Load the generic ASMInformation file:
set(ASM_DIALECT "-ATT")
include(Internal/CMakeASMLinkerInformation)
set(ASM_DIALECT)

View File

@@ -0,0 +1,35 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID)
include(Linker/${CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID}-ASM${ASM_DIALECT} OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_LINKER_ID}-ASM${ASM_DIALECT}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-ASM${ASM_DIALECT} OPTIONAL)
endif ()
set(CMAKE_ASM${ASM_DIALECT}_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# support for the MS assembler, masm and masm64
# Load the generic ASMInformation file:
set(ASM_DIALECT "_MASM")
include(Internal/CMakeASMLinkerInformation)
set(ASM_DIALECT)

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# support for the MS assembler, masm and masm64
# Load the generic ASMInformation file:
set(ASM_DIALECT "_MASM")
include(Internal/CMakeASMLinkerInformation)
set(ASM_DIALECT)

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# support for the nasm assembler
# Load the generic ASMInformation file:
set(ASM_DIALECT "_NASM")
include(Internal/CMakeASMLinkerInformation)
set(ASM_DIALECT)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_C_COMPILER_LINKER_ID)
include(Linker/${CMAKE_C_COMPILER_LINKER_ID}-C OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_C_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_C_COMPILER_LINKER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_C_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_C_COMPILER_LINKER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-C OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(C)
set(CMAKE_C_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the CSharp compiler in CMake.
# For now, nothing to define
set(CMAKE_CSharp_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_CUDA_COMPILER_LINKER_ID)
include(Linker/${CMAKE_CUDA_COMPILER_LINKER_ID}-CUDA OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_CUDA_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_CUDA_COMPILER_LINKER_ID}-CUDA-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_CUDA_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_CUDA_COMPILER_LINKER_ID}-CUDA
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-CUDA OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(CUDA)
set(CMAKE_CUDA_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C++ compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_CXX_COMPILER_LINKER_ID)
include(Linker/${CMAKE_CXX_COMPILER_LINKER_ID}-CXX OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_CXX_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_LINKER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_CXX_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_LINKER_ID}-CXX
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(CXX)
set(CMAKE_CXX_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,18 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file contains common code blocks used by all the linker information
# files
macro(_cmake_common_linker_platform_flags lang)
# Define configuration for LINK_WHAT_YOU_USE feature
if(CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
if(NOT DEFINED CMAKE_${lang}_LINK_WHAT_YOU_USE_FLAG)
set(CMAKE_${lang}_LINK_WHAT_YOU_USE_FLAG "LINKER:--no-as-needed")
endif()
if(NOT DEFINED CMAKE_LINK_WHAT_YOU_USE_CHECK)
set(CMAKE_LINK_WHAT_YOU_USE_CHECK ldd -u -r)
endif()
endif()
endmacro ()

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_Fortran_COMPILER_LINKER_ID)
include(Linker/${CMAKE_Fortran_COMPILER_LINKER_ID}-Fortran OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_Fortran_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_LINKER_ID}-Fortran-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_Fortran_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_LINKER_ID}-Fortran
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(Fortran)
set(CMAKE_Fortran_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_HIP_COMPILER_LINKER_ID)
include(Linker/${CMAKE_HIP_COMPILER_LINKER_ID}-HIP OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_HIP_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_HIP_COMPILER_LINKER_ID}-HIP-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_HIP_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_HIP_COMPILER_LINKER_ID}-HIP
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-HIP OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(HIP)
set(CMAKE_HIP_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the ISPC compiler in CMake.
# For now, ISPC is not able to handle the link step
set(CMAKE_ISPC_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Java language does not have a concept of linker, so nothing to configure.

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the Objective-C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_OBJC_COMPILER_LINKER_ID)
include(Linker/${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_OBJC_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_OBJC_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-OBJC OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(OBJC)
set(CMAKE_OBJC_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the Objective-C++ compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_OBJCXX_COMPILER_LINKER_ID)
include(Linker/${CMAKE_OBJCXX_COMPILER_LINKER_ID}-C OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_OBJCXX_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJCXX_COMPILER_LINKER_ID}-OBJCXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_OBJCXX_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJCXX_COMPILER_LINKER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-OBJCXX OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(OBJCXX)
set(CMAKE_OBJCXX_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,17 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the C compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Foe now, no linker associated with RC language
set(CMAKE_RC_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,39 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This file sets the basic flags for the linker used by the Swift compiler in CMake.
# It also loads the available platform file for the system-linker
# if it exists.
# It also loads a system - linker - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
include(Internal/CMakeCommonLinkerInformation)
set(_INCLUDED_FILE 0)
# Load linker-specific information.
if(CMAKE_Swoft_COMPILER_LINKER_ID)
include(Linker/${CMAKE_Swift_COMPILER_LINKER_ID}-Swift OPTIONAL)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_Swift_COMPILER_LINKER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_LINKER_ID}-Swift-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# load the system- and linker specific files
if(CMAKE_Swift_COMPILER_LINKER_ID)
include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_C_COMPILER_LINKER_ID}-Swift
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif()
# We specify the platform linker information in the system file.
if (NOT _INCLUDED_FILE)
include(Platform/Linker/${CMAKE_SYSTEM_NAME}-Swift OPTIONAL)
endif ()
_cmake_common_linker_platform_flags(Swift)
set(CMAKE_Swift_LINKER_INFORMATION_LOADED 1)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/AIX)
__linker_aix(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/AIX)
__linker_aix(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/AIX)
__linker_aix(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/AIX)
__linker_aix(Fortran)

9
Modules/Linker/AIX.cmake Normal file
View File

@@ -0,0 +1,9 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple linkers; use include blocker.
include_guard()
macro(__linker_aix lang)
endmacro()

View File

@@ -0,0 +1,3 @@
include(Linker/AppleClang)
__linker_appleclang(ASM)

View File

@@ -0,0 +1,3 @@
include(Linker/AppleClang)
__linker_appleclang(C)

View File

@@ -0,0 +1,3 @@
include(Linker/AppleClang)
__linker_appleclang(CXX)

View File

@@ -0,0 +1,3 @@
include(Linker/AppleClang)
__linker_appleclang(OBJC)

View File

@@ -0,0 +1,3 @@
include(Linker/AppleClang)
__linker_appleclang(OBJCXX)

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple linkers; use include blocker.
include_guard()
macro(__linker_appleclang lang)
endmacro()

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(CUDA)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(Fortran)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(HIP)

69
Modules/Linker/GNU.cmake Normal file
View File

@@ -0,0 +1,69 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple linkers; use include blocker.
include_guard()
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0140 NEW)
function(__linker_gnu lang)
# define flags for linker depfile generation
set(CMAKE_${lang}_LINKER_DEPFILE_FLAGS "LINKER:--dependency-file,<DEP_FILE>")
set(CMAKE_${lang}_LINKER_DEPFILE_FORMAT gcc)
if(NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
## Ensure ninja tool is recent enough...
if(CMAKE_GENERATOR MATCHES "^Ninja")
# Ninja 1.10 or upper is required
execute_process(COMMAND "${CMAKE_MAKE_PROGRAM}" --version
OUTPUT_VARIABLE _ninja_version
ERROR_VARIABLE _ninja_version)
if (_ninja_version MATCHES "[0-9]+(\\.[0-9]+)*")
set (_ninja_version "${CMAKE_MATCH_0}")
endif()
if (_ninja_version VERSION_LESS "1.10")
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
endif()
if (NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
## check if this feature is supported by the linker
if (CMAKE_${lang}_COMPILER_LINKER AND CMAKE_${lang}_COMPILER_LINKER_ID MATCHES "GNU|LLD")
execute_process(COMMAND "${CMAKE_${lang}_COMPILER_LINKER}" --help
OUTPUT_VARIABLE _linker_capabilities
ERROR_VARIABLE _linker_capabilities)
if(_linker_capabilities MATCHES "--dependency-file")
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED TRUE)
else()
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
else()
set(CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED FALSE)
endif()
endif()
endif()
if (CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER TRUE)
else()
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
endif()
# Due to GNU binutils ld bug when LTO is enabled (see GNU bug
# `30568 <https://sourceware.org/bugzilla/show_bug.cgi?id=30568>`_),
# deactivate this feature if the version is less than 2.41.
if (CMAKE_${lang}_COMPILER_LINKER_ID
AND CMAKE_${lang}_COMPILER_LINKER_ID STREQUAL "GNU"
AND CMAKE_${lang}_COMPILER_LINKER_VERSION VERSION_LESS "2.41")
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
endif()
return(PROPAGATE CMAKE_${lang}_LINKER_DEPFILE_FLAGS
CMAKE_${lang}_LINKER_DEPFILE_FORMAT
CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED
CMAKE_${lang}_LINK_DEPENDS_USE_LINKER)
endfunction()
endblock()

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(CUDA)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(Fortran)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNUgold)
__linker_gnugold(HIP)

View File

@@ -0,0 +1,18 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple linkers; use include blocker.
include_guard()
include(Linker/GNU)
macro(__linker_gnugold lang)
__linker_gnu(${lang})
# Due to GNU binutils ld bug when LTO is enabled (see GNU bug
# `30568 <https://sourceware.org/bugzilla/show_bug.cgi?id=30568>`_),
# deactivate this feature because all known versions of gold linker have
# this bug.
set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
endmacro()

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(CUDA)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(Fortran)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(HIP)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(OBJC)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/LLD)
__linker_lld(OBJCXX)

10
Modules/Linker/LLD.cmake Normal file
View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include_guard()
include(Linker/GNU)
macro(__linker_lld lang)
__linker_gnu(${lang})
endmacro()

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(CUDA)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(Fortran)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(HIP)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(OBJC)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/GNU)
__linker_gnu(OBJCXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/Solaris)
__linker_solaris(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/Solaris)
__linker_solaris(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/Solaris)
__linker_solaris(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Linker/Solaris)
__linker_solaris(Fortran)

View File

@@ -0,0 +1,9 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple linkers; use include blocker.
include_guard()
macro(__linker_solaris lang)
endmacro()

View File

@@ -17,7 +17,6 @@ macro(__aix_compiler_gnu lang)
set(CMAKE_${lang}_VERBOSE_LINK_FLAG "-Wl,-v")
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 7 OR CMAKE_SYSTEM_VERSION VERSION_LESS 7.1)
unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY)

View File

@@ -17,7 +17,6 @@ macro(__aix_compiler_xl lang)
set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
set(_OBJECTS " <OBJECTS>")
if(DEFINED CMAKE_XL_CreateExportList AND CMAKE_XL_CreateExportList STREQUAL "")

View File

@@ -15,8 +15,6 @@ macro(__apple_compiler_clang lang)
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
endif()
set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "-framework <LIBRARY>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
set(CMAKE_${lang}_LINK_LIBRARY_FRAMEWORK_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)

View File

@@ -16,33 +16,6 @@ set(CMAKE_GNULD_IMAGE_VERSION
set(CMAKE_GENERATOR_RC windres)
# Features for LINK_LIBRARY generator expression
## check linker capabilities
if(NOT DEFINED _CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED)
execute_process(COMMAND "${CMAKE_LINKER}" --help
OUTPUT_VARIABLE __linker_help
ERROR_VARIABLE __linker_help)
if(__linker_help MATCHES "--push-state" AND __linker_help MATCHES "--pop-state")
set(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED TRUE CACHE INTERNAL "linker supports push/pop state")
else()
set(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED FALSE CACHE INTERNAL "linker supports push/pop state")
endif()
unset(__linker_help)
endif()
## WHOLE_ARCHIVE: Force loading all members of an archive
if(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED)
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:--push-state,--whole-archive"
"<LINK_ITEM>"
"LINKER:--pop-state")
else()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:--whole-archive"
"<LINK_ITEM>"
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
macro(__cygwin_compiler_gnu lang)
# Binary link rules.
set(CMAKE_${lang}_CREATE_SHARED_MODULE

View File

@@ -141,11 +141,6 @@ set(CMAKE_LINK_LIBRARY_USING_WEAK_LIBRARY "PATH{LINKER:-weak_library,<LIBRARY>}N
set(CMAKE_LINK_LIBRARY_USING_WEAK_LIBRARY_SUPPORTED TRUE)
set(CMAKE_LINK_LIBRARY_WEAK_LIBRARY_ATTRIBUTES LIBRARY_TYPE=STATIC,SHARED DEDUPLICATION=DEFAULT OVERRIDE=DEFAULT)
# Defines LINK_LIBRARY feature to Force loading of all members of an archive
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:-force_load,<LIB_ITEM>")
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# default to searching for frameworks first
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
set(CMAKE_FIND_FRAMEWORK FIRST)

View File

@@ -27,33 +27,6 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
endforeach()
# Features for LINK_LIBRARY generator expression
## check linker capabilities
if(NOT DEFINED _CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED)
execute_process(COMMAND "${CMAKE_LINKER}" --help
OUTPUT_VARIABLE __linker_help
ERROR_VARIABLE __linker_help)
if(__linker_help MATCHES "--push-state" AND __linker_help MATCHES "--pop-state")
set(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED TRUE CACHE INTERNAL "linker supports push/pop state")
else()
set(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED FALSE CACHE INTERNAL "linker supports push/pop state")
endif()
unset(__linker_help)
endif()
## WHOLE_ARCHIVE: Force loading all members of an archive
if(_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED)
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:--push-state,--whole-archive"
"<LINK_ITEM>"
"LINKER:--pop-state")
else()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:--whole-archive"
"<LINK_ITEM>"
"LINKER:--no-whole-archive")
endif()
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
set(CMAKE_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
# Features for LINK_GROUP generator expression
## RESCAN: request the linker to rescan static libraries until there is
## no pending undefined symbols

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/AIX-AIX)
__aix_linker_aix(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/AIX-AIX)
__aix_linker_aix(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/AIX-AIX)
__aix_linker_aix(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/AIX-AIX)
__aix_linker_aix(Fortran)

View File

@@ -0,0 +1,10 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple languages; use include blocker.
include_guard()
macro(__aix_linker_aix lang)
set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
endmacro()

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AIX is the default linker
include(Platform/Linker/AIX-AIX-ASM)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AIX is the default linker
include(Platform/Linker/AIX-AIX-C)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AIX is the default linker
include(Platform/Linker/AIX-AIX-CXX)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AIX is the default linker
include(Platform/Linker/AIX-AIX-Fortran)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AppleClang is the default linker
include(Platform/Linker/Apple-AppleClang-ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(ASM)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(C)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(CUDA)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(CXX)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(Fortran)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(OBJC)

View File

@@ -0,0 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang)
__apple_linker_appleclang(OBJCXX)

View File

@@ -0,0 +1,16 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple languages; use include blocker.
include_guard()
macro(__apple_linker_appleclang lang)
set(CMAKE_${lang}_LINK_LIBRARIES_PROCESSING ORDER=REVERSE DEDUPLICATION=ALL)
# Features for LINK_LIBRARY generator expression
## WHOLE_ARCHIVE: Force loading all members of an archive
set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:-force_load,<LIB_ITEM>")
set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
set(CMAKE_${lang}_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
endmacro()

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AppleClang is the default linker
include(Platform/Linker/Apple-AppleClang-C)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AppleClang is the default linker
include(Platform/Linker/Apple-AppleClang-CUDA)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AppleClang is the default linker
include(Platform/Linker/Apple-AppleClang-CXX)

View File

@@ -0,0 +1,5 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# AppleClang is the default linker
include(Platform/Linker/Apple-AppleClang-Fortran)

View File

@@ -0,0 +1,4 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang-C)

View File

@@ -0,0 +1,4 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang-CXX)

View File

@@ -0,0 +1,4 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/Apple-AppleClang-OBJC)

Some files were not shown because too many files have changed in this diff Show More