19e86336ef
Parse the components as decimal, instead of decuding the base from the string. This avoids ambiguity if the second number contains leading zeros, which previously were parsed as indicating an octal number. MS link.exe doesn't support hexadecimal numbers in the version numbers, neither in /version nor in /subsystem. Differential Revision: https://reviews.llvm.org/D88801
26 lines
834 B
Plaintext
26 lines
834 B
Plaintext
# RUN: yaml2obj %p/Inputs/ret42.yaml -o %t.obj
|
|
|
|
# RUN: lld-link /out:%t.exe /entry:main %t.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
|
|
|
|
DEFAULT: MajorImageVersion: 0
|
|
DEFAULT: MinorImageVersion: 0
|
|
|
|
# RUN: lld-link /out:%t.exe /entry:main %t.obj /version:11
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
|
|
|
|
CHECK1: MajorImageVersion: 11
|
|
CHECK1: MinorImageVersion: 0
|
|
|
|
# RUN: lld-link /out:%t.exe /entry:main %t.obj /version:11.22
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
|
|
|
|
CHECK2: MajorImageVersion: 11
|
|
CHECK2: MinorImageVersion: 22
|
|
|
|
# RUN: lld-link /out:%t.exe /entry:main %t.obj /version:8.09
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK3 %s
|
|
|
|
CHECK3: MajorImageVersion: 8
|
|
CHECK3: MinorImageVersion: 9
|