Merge topic 'GNU-linker-pushpop_state-detection'

d5be7c7f31 Linker: Detect GNU push-state/pop-state flags more robustly
7b552b9a64 Linker: Save GNU push-/pop-state detection with compiler inspection results
a9b126b0da Linker: Save linker inspection results with compiler inspection results
3f5f2b2d49 Linker: Honor CMAKE_<LANG>_LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10468
This commit is contained in:
Brad King
2025-03-21 12:06:29 +00:00
committed by Kitware Robot
25 changed files with 169 additions and 20 deletions
@@ -0,0 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Load the generic ASM test file:
set(ASM_DIALECT "-ATT")
include(Internal/CMakeInspectASMLinker)
set(ASM_DIALECT)
@@ -0,0 +1,27 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
block()
foreach(_var IN ITEMS
COMPILER
COMPILER_ID
COMPILER_ARG1
COMPILER_ENV_VAR
COMPILER_AR
COMPILER_RANLIB
COMPILER_VERSION
COMPILER_LINKER
COMPILER_LINKER_ID
COMPILER_LINKER_VERSION
COMPILER_LINKER_FRONTEND_VARIANT
LINKER_DEPFILE_SUPPORTED
LINKER_PUSHPOP_STATE_SUPPORTED
)
set(_CMAKE_ASM_${_var} "${CMAKE_ASM${ASM_DIALECT}_${_var}}")
endforeach()
configure_file(
${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake
@ONLY)
endblock()
@@ -0,0 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Load the generic ASM test file:
set(ASM_DIALECT "_MARMASM")
include(Internal/CMakeInspectASMLinker)
set(ASM_DIALECT)
@@ -0,0 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Load the generic ASM test file:
set(ASM_DIALECT "_MASM")
include(Internal/CMakeInspectASMLinker)
set(ASM_DIALECT)
@@ -0,0 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Load the generic ASM test file:
set(ASM_DIALECT "_NASM")
include(Internal/CMakeInspectASMLinker)
set(ASM_DIALECT)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeCUDACompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCUDACompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeFortranCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeHIPCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeHIPCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeOBJCCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeOBJCCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeOBJCXXCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeOBJCXXCompiler.cmake
@ONLY)
@@ -0,0 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeSwiftCompiler.cmake.in
${CMAKE_PLATFORM_INFO_DIR}/CMakeSwiftCompiler.cmake
@ONLY)