2018-06-06 21:56:51 +08:00
|
|
|
# REQUIRES: x86
|
2017-09-02 06:12:10 +08:00
|
|
|
RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o alpha.obj %S/Inputs/alpha.ll
|
|
|
|
RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o beta.obj %S/Inputs/beta.ll
|
|
|
|
RUN: lld-link /out:alpha.dll /dll alpha.obj /implib:alpha.lib
|
|
|
|
RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-ALPHA
|
|
|
|
|
2019-10-18 18:43:15 +08:00
|
|
|
CHECK-ALPHA: error: duplicate symbol: f
|
|
|
|
CHECK-ALPHA: defined at {{.*}}alpha.obj
|
|
|
|
CHECK-APLHA: defined at alpha.dll
|
2017-09-02 06:12:10 +08:00
|
|
|
|
|
|
|
RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll
|
|
|
|
RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA
|
|
|
|
|
2019-10-18 18:43:15 +08:00
|
|
|
CHECK-GAMMA: error: duplicate symbol: __declspec(dllimport) f
|
|
|
|
CHECK-GAMMA: defined at {{.*}}gamma.obj
|
|
|
|
CHECK-GAMMA: defined at alpha.dll
|
2017-09-02 06:12:10 +08:00
|
|
|
|