1# REQUIRES: x86 2RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o alpha.obj %S/Inputs/alpha.ll 3RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o beta.obj %S/Inputs/beta.ll 4RUN: lld-link /out:alpha.dll /dll alpha.obj /implib:alpha.lib 5RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-ALPHA 6 7CHECK-ALPHA: error: duplicate symbol: f 8CHECK-ALPHA: defined at {{.*}}alpha.obj 9CHECK-APLHA: defined at alpha.dll 10 11RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll 12RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA 13 14CHECK-GAMMA: error: duplicate symbol: __declspec(dllimport) f 15CHECK-GAMMA: defined at {{.*}}gamma.obj 16CHECK-GAMMA: defined at alpha.dll 17 18