mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fixed for the difference of Cygwin with other Windows variants (MSVC, Itanium, MinGW). - The platform name is renamed to "cygwin" from "windows" which is used for searching the standard libraries. - The consideration for DLL storage class (DllExport/DllImport) is not required for Cygwin and MinGW. There is no problem when linking in these environment. - Cygwin should use large memory model as default.(This may be changed if someone ports to 32bit) - Cygwin and MinGW should use the autolink feature in the sameway of Linux due to the linker's limit.
25 lines
1.4 KiB
Swift
25 lines
1.4 KiB
Swift
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-IR
|
|
// RUN: %swift -target thumbv7--windows-itanium -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-ASM
|
|
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-IR
|
|
// RUN: %swift -target thumbv7--windows-msvc -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | %FileCheck %s -check-prefix CHECK-MSVC-ASM
|
|
|
|
// REQUIRES: CODEGENERATOR=ARM
|
|
|
|
#if MAIN_MODULE
|
|
import module
|
|
#endif
|
|
|
|
// CHECK-MSVC-IR: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"Linker Options", [[NODE:![0-9]+]]}
|
|
// CHECK-MSVC-IR: [[NODE]] = !{[[LIST:![0-9]+]]}
|
|
// CHECK-MSVC-IR: [[LIST]] = !{!"/DEFAULTLIB:module.lib"}
|
|
|
|
// CHECK-MSVC-ASM: .section .drectve
|
|
// CHECK-MSVC-ASM: .ascii " /DEFAULTLIB:module.lib"
|
|
|