The following platforms were missing: * Android * WindowsCE, WindowsPhone, WindowsStore and WindowsKernelModeDriver And enhance various Apple platforms support (iOS, tvOS, etc...) Fixes: #26439
@@ -29,7 +29,7 @@ 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)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-ASM${ASM_DIALECT} OPTIONAL)
endif ()
set(CMAKE_ASM${ASM_DIALECT}_LINKER_INFORMATION_LOADED 1)
@@ -31,7 +31,7 @@ endif()
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-C OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-C OPTIONAL)
_cmake_common_linker_platform_flags(C)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-CUDA OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-CUDA OPTIONAL)
_cmake_common_linker_platform_flags(CUDA)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-CXX OPTIONAL)
_cmake_common_linker_platform_flags(CXX)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-Fortran OPTIONAL)
_cmake_common_linker_platform_flags(Fortran)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-HIP OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-HIP OPTIONAL)
_cmake_common_linker_platform_flags(HIP)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-OBJC OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-OBJC OPTIONAL)
_cmake_common_linker_platform_flags(OBJC)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-OBJCXX OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-OBJCXX OPTIONAL)
_cmake_common_linker_platform_flags(OBJCXX)
- include(Platform/Linker/${CMAKE_SYSTEM_NAME}-Swift OPTIONAL)
+ include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-Swift OPTIONAL)
_cmake_common_linker_platform_flags(Swift)
@@ -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.
+
+# GNU is the default linker
+include(Platform/Linker/Android-GNU-ASM)
+include(Platform/Linker/Android-GNU-C)
+include(Platform/Linker/Android-GNU-CXX)
@@ -0,0 +1,4 @@
+include(Platform/Linker/Linux-GNU-ASM)
+include(Platform/Linker/Linux-GNU-C)
+include(Platform/Linker/Linux-GNU-CXX)
+include(Platform/Linker/Linux-LLD-ASM)
+include(Platform/Linker/Linux-LLD-C)
+include(Platform/Linker/Linux-LLD-CXX)
+# MSVC is the default linker
+include(Platform/Linker/WindowsCE-MSVC-C)
+include(Platform/Linker/WindowsCE-MSVC-CXX)
+include(Platform/Linker/Windows-MSVC-C)
+include(Platform/Linker/Windows-MSVC-CXX)
+include(Platform/Linker/WindowsKernelModeDriver-MSVC-C)
+include(Platform/Linker/WindowsKernelModeDriver-MSVC-CXX)
@@ -0,0 +1,15 @@
+block(SCOPE_FOR POLICIES)
+cmake_policy(SET CMP0054 NEW)
+if(CMAKE_ASM_SIMULATE_ID STREQUAL "MSVC")
+ # MSVC is the default linker
+ include(Platform/Linker/WindowsPhone-MSVC-ASM)
+else()
+ # GNU is the default linker
+ include(Platform/Linker/WindowsPhone-GNU-ASM)
+endif()
+endblock()
+if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
+ include(Platform/Linker/WindowsPhone-MSVC-C)
+ include(Platform/Linker/WindowsPhone-GNU-C)
+if(CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+ include(Platform/Linker/WindowsPhone-MSVC-CXX)
+ include(Platform/Linker/WindowsPhone-GNU-CXX)
+include(Platform/Linker/Windows-GNU-ASM)
+include(Platform/Linker/Windows-GNU-C)
+include(Platform/Linker/Windows-GNU-CXX)
+include(Platform/Linker/Windows-LLD-ASM)
+include(Platform/Linker/Windows-LLD-C)
+include(Platform/Linker/Windows-LLD-CXX)
+include(Platform/Linker/Windows-MSVC-ASM)
+ include(Platform/Linker/WindowsStore-MSVC-ASM)
+ include(Platform/Linker/WindowsStore-GNU-ASM)
+ include(Platform/Linker/WindowsStore-MSVC-C)
+ include(Platform/Linker/WindowsStore-GNU-C)
+ include(Platform/Linker/WindowsStore-MSVC-CXX)
+ include(Platform/Linker/WindowsStore-GNU-CXX)