150
|
1 REQUIRES: x86
|
|
2
|
|
3 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
|
|
4 RUN: %p/Inputs/ret42.obj
|
|
5
|
|
6 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
|
|
7 RUN: %p/Inputs/ret42.obj /failifmismatch:k1=v1 /failifmismatch:k2=v1
|
|
8
|
|
9 RUN: lld-link /entry:main /subsystem:console /out:%t.exe \
|
|
10 RUN: %p/Inputs/ret42.obj /failifmismatch:k1=v1 /failifmismatch:k1=v1
|
|
11
|
|
12 RUN: 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
|
|
14
|
|
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: not lld-link %t1.obj %t2.obj 2>&1 | FileCheck %s -check-prefix OBJ
|
|
18
|
|
19 RUN: llvm-lib %t1.obj /out:%t.lib
|
|
20 RUN: not lld-link %t.lib %t2.obj 2>&1 | FileCheck %s -check-prefix LIB
|
|
21
|
|
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
|
|
25
|
|
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
|
|
29
|
|
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
|