blob: cf57eff7031c3c016819814fe397dae0b4d480ce [file] [log] [blame]
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %swift -target thumbv7--windows-gnu -parse-as-library -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
// RUN: %swift -target thumbv7--windows-gnu -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | FileCheck %s -check-prefix CHECK-GNU-IR
// RUN: %swift -target thumbv7--windows-gnu -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | FileCheck %s -check-prefix CHECK-GNU-ASM
// 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-GNU-IR: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"Linker Options", [[NODE:![0-9]+]]}
// CHECK-GNU-IR: [[NODE]] = !{[[LIST:![0-9]+]]}
// CHECK-GNU-IR: [[LIST]] = !{!"-lmodule"}
// CHECK-GNU-ASM: .section .drectve
// CHECK-GNU-ASM: .ascii " -lmodule"
// 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"