2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
4 # RUN: not %lld -o %t/executable %t.o -o /dev/null \
5 # RUN: -compatibility_version 10 -current_version 11 2>&1 | \
6 # RUN: FileCheck --check-prefix=NEEDDYLIB %s
7 # RUN: not %lld -execute -o %t/executable %t.o -o /dev/null \
8 # RUN: -compatibility_version 10 -current_version 11 2>&1 | \
9 # RUN: FileCheck --check-prefix=NEEDDYLIB %s
10 # RUN: not %lld -bundle -o %t/executable %t.o -o /dev/null \
11 # RUN: -compatibility_version 10 -current_version 11 2>&1 | \
12 # RUN: FileCheck --check-prefix=NEEDDYLIB %s
14 # NEEDDYLIB: error: -compatibility_version 10: only valid with -dylib
15 # NEEDDYLIB: error: -current_version 11: only valid with -dylib
17 # RUN: not %lld -dylib -o %t/executable %t.o -o /dev/null \
18 # RUN: -compatibility_version 1.2.3.4 -current_version 1.2.3.4.5 2>&1 | \
19 # RUN: FileCheck --check-prefix=MALFORMED %s
21 # MALFORMED: error: -compatibility_version 1.2.3.4: malformed version
22 # MALFORMED: error: -current_version 1.2.3.4.5: malformed version
24 # RUN: not %lld -dylib -o %t/executable %t.o -o /dev/null \
25 # RUN: -compatibility_version 80000.1 -current_version 1.2.3 2>&1 | \
26 # RUN: FileCheck --check-prefix=BADMAJOR %s
28 # BADMAJOR: error: -compatibility_version 80000.1: malformed version
30 # RUN: not %lld -dylib -o %t/executable %t.o -o /dev/null \
31 # RUN: -compatibility_version 8.300 -current_version 1.2.3 2>&1 | \
32 # RUN: FileCheck --check-prefix=BADMINOR %s
34 # BADMINOR: error: -compatibility_version 8.300: malformed version
36 # RUN: not %lld -dylib -o %t/executable %t.o -o /dev/null \
37 # RUN: -compatibility_version 8.8.300 -current_version 1.2.3 2>&1 | \
38 # RUN: FileCheck --check-prefix=BADSUBMINOR %s
40 # BADSUBMINOR: error: -compatibility_version 8.8.300: malformed version
42 # RUN: %lld -dylib -o %t/executable %t.o -o %t.dylib \
43 # RUN: -compatibility_version 1.2.3 -current_version 2.5.6
44 # RUN: llvm-objdump --macho --all-headers %t.dylib | FileCheck %s
46 # CHECK: cmd LC_ID_DYLIB
49 # CHECK-NEXT: time stamp
50 # CHECK-NEXT: current version 2.5.6
51 # CHECK-NEXT: compatibility version 1.2.3