brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · e37fa1c Raw
78 lines · plain
1REQUIRES: aarch64-registered-target2 3Prepare inputs:4 5RUN: rm -rf %t && mkdir -p %t6RUN: llvm-mc -triple=i386-pc-windows-msvc -filetype=obj -o %t/i386.obj %S/Inputs/a.s7RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t/x86_64.obj %S/Inputs/a.s8RUN: llvm-mc -triple=aarch64-pc-windows-msvc -filetype=obj -o %t/arm64.obj %S/Inputs/a.s9RUN: llvm-mc -triple=arm64ec-pc-windows-msvc -filetype=obj -o %t/arm64ec.obj %S/Inputs/a.s10RUN: llvm-as -o %t/i386.bc %S/Inputs/i386.ll11RUN: llvm-as -o %t/x86_64.bc %S/Inputs/x86_64.ll12RUN: llvm-as -o %t/arm64.bc %S/Inputs/arm64.ll13RUN: yaml2obj -o %t/arm64x.obj %S/Inputs/arm64x.yaml14 15 16Mixing bitcode and normal object files with the same machine type is ok:17 18RUN: llvm-lib %t/i386.obj %t/i386.bc19RUN: llvm-lib %t/x86_64.obj %t/x86_64.bc20 21 22As is including resource files:23 24RUN: llvm-lib /out:%t.lib %S/Inputs/resource.res %t/i386.obj %t/i386.bc25RUN: llvm-lib /out:%t.lib %t/x86_64.obj %S/Inputs/resource.res %t/x86_64.bc26 27 28Mixing object files with different machine type is not ok:29 30RUN: not llvm-lib %t/x86_64.obj %t/i386.obj 2>&1 | \31RUN:     FileCheck --check-prefix=OBJ32 %s32OBJ32: i386.obj: file machine type x86 conflicts with library machine type x64 (inferred from earlier file '{{.*}}x86_64.obj')33 34 35Neither is mixing object and bitcode files with different machine type:36 37RUN: not llvm-lib %t/x86_64.obj %t/i386.bc 2>&1 | \38RUN:     FileCheck --check-prefix=BC32 %s39BC32: i386.bc: file machine type x86 conflicts with library machine type x64 (inferred from earlier file '{{.*}}x86_64.obj')40 41RUN: not llvm-lib %t/arm64.bc %t/x86_64.bc 2>&1 | \42RUN:     FileCheck --check-prefix=BC64 %s43BC64: x86_64.bc: file machine type x64 conflicts with library machine type arm64 (inferred from earlier file '{{.*}}arm64.bc')44 45 46If /machine: is passed, its value is authoritative.47 48RUN: not llvm-lib /machine:X86 %t/x86_64.obj %t/i386.obj 2>&1 | \49RUN:     FileCheck --check-prefix=OBJ64 %s50OBJ64: x86_64.obj: file machine type x64 conflicts with library machine type x86 (from '/machine:X86' flag)51 52 53Mixing arm64 and x86_64 is possible using arm64ec:54 55RUN: llvm-lib -machine:arm64ec %t/arm64.bc %t/x86_64.bc %t/arm64.obj %t/x86_64.obj %t/arm64ec.obj %t/arm64x.obj56RUN: llvm-lib -machine:arm64x %t/arm64.bc %t/x86_64.bc %t/arm64.obj %t/x86_64.obj %t/arm64ec.obj %t/arm64x.obj57RUN: llvm-lib -machine:arm64 %t/arm64.bc %t/arm64.obj %t/arm64x.obj58 59RUN: not llvm-lib %t/arm64ec.obj 2>&1 | FileCheck --check-prefix=NOEC %s60NOEC: arm64ec.obj: file machine type arm64ec conflicts with inferred library machine type, use /machine:arm64ec or /machine:arm64x61 62RUN: not llvm-lib -machine:arm64ec %t/arm64ec.obj %t/i386.obj 2>&1 | \63RUN:     FileCheck --check-prefix=OBJEC %s64RUN: not llvm-lib -machine:arm64x %t/arm64ec.obj %t/i386.obj 2>&1 | \65RUN:     FileCheck --check-prefix=OBJX %s66RUN: not llvm-lib -machine:x64 %t/x86_64.obj %t/arm64x.obj 2>&1 | \67RUN:     FileCheck --check-prefix=OBJX2 %s68OBJEC: i386.obj: file machine type x86 conflicts with library machine type arm64ec (from '/machine:arm64ec' flag)69OBJX:  i386.obj: file machine type x86 conflicts with library machine type arm64x (from '/machine:arm64x' flag)70OBJX2: arm64x.obj: file machine type arm64x conflicts with library machine type x64 (from '/machine:x64' flag)71 72RUN: not llvm-lib -machine:arm64ec %t/arm64.bc %t/x86_64.bc %t/i386.bc 2>&1 | \73RUN:     FileCheck --check-prefix=BCEC %s74RUN: not llvm-lib -machine:arm64x %t/arm64.bc %t/x86_64.bc %t/i386.bc 2>&1 | \75RUN:     FileCheck --check-prefix=BCX %s76BCEC: i386.bc: file machine type x86 conflicts with library machine type arm64ec (from '/machine:arm64ec' flag)77BCX:  i386.bc: file machine type x86 conflicts with library machine type arm64x (from '/machine:arm64x' flag)78