From 576c2e7a2d537f95c83a552e722203c5164c6e78 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 29 Nov 2019 14:18:59 -0800 Subject: Swift: move windows handling into platform file (NFC) This moves the definition of the import library flags for Windows into a platform specific file (much like the Darwin `-sdk` flag). This is in preparation for re-use of the flag to make the flags handling for executables more precise. --- Modules/CMakeSwiftInformation.cmake | 4 ---- Modules/Platform/Windows-Apple-Swift.cmake | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 Modules/Platform/Windows-Apple-Swift.cmake diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 2c54da0..672d3f8 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -72,10 +72,6 @@ if(NOT CMAKE_Swift_NUM_THREADS MATCHES "^[0-9]+$") cmake_host_system_information(RESULT CMAKE_Swift_NUM_THREADS QUERY NUMBER_OF_LOGICAL_CORES) endif() -if(CMAKE_SYSTEM_NAME STREQUAL Windows) - set(CMAKE_Swift_IMPLIB_LINKER_FLAGS "-Xlinker -implib:") -endif() - if(NOT CMAKE_Swift_CREATE_SHARED_LIBRARY) set(CMAKE_Swift_CREATE_SHARED_LIBRARY " -output-file-map -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-library -o -module-name -module-link-name -emit-module -emit-module-path -emit-dependencies ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} ") endif() diff --git a/Modules/Platform/Windows-Apple-Swift.cmake b/Modules/Platform/Windows-Apple-Swift.cmake new file mode 100644 index 0000000..1177755 --- /dev/null +++ b/Modules/Platform/Windows-Apple-Swift.cmake @@ -0,0 +1 @@ +set(CMAKE_Swift_IMPLIB_LINKER_FLAGS "-Xlinker -implib:") -- cgit v0.12