3 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
4 RUN: %p/Inputs/ret42.obj
6 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
7 RUN: %p/Inputs/ret42.obj /failifmismatch:k1=v1 /failifmismatch:k2=v1
9 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
10 RUN: %p/Inputs/ret42.obj /failifmismatch:k1=v1 /failifmismatch:k1=v1
12 RUN: env LLD_IN_TEST=1 not lld-link /entry:main /subsystem:console /out:%t.exe \
13 RUN: %p/Inputs/ret42.obj /failifmismatch:k1=v1 /failifmismatch:k1=v2 2>&1 | FileCheck %s
15 RUN: llc < %p/Inputs/failmismatch1.ll -mtriple x86_64-windows-msvc -filetype obj -o %t1.obj
16 RUN: llc < %p/Inputs/failmismatch2.ll -mtriple x86_64-windows-msvc -filetype obj -o %t2.obj
17 RUN: env LLD_IN_TEST=1 not lld-link %t1.obj %t2.obj 2>&1 | FileCheck %s -check-prefix OBJ
19 RUN: llvm-lib %t1.obj /out:%t.lib
20 RUN: env LLD_IN_TEST=1 not lld-link %t.lib %t2.obj 2>&1 | FileCheck %s -check-prefix LIB
22 CHECK: lld-link: error: /failifmismatch: mismatch detected for 'k1':
23 CHECK-NEXT: >>> cmd-line has value v1
24 CHECK-NEXT: >>> cmd-line has value v2
26 OBJ: lld-link: error: /failifmismatch: mismatch detected for 'TEST':
27 OBJ-NEXT: >>> {{.*}}failifmismatch.test.tmp1.obj has value 1
28 OBJ-NEXT: >>> {{.*}}failifmismatch.test.tmp2.obj has value 2
30 LIB: lld-link: error: /failifmismatch: mismatch detected for 'TEST':
31 LIB-NEXT: >>> {{.*}}failifmismatch.test.tmp2.obj has value 2
32 LIB-NEXT: >>> failifmismatch.test.tmp.lib(failifmismatch.test.tmp1.obj) has value 1