[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / lld / test / MachO / platform-version.s
blob57fbae62b2ffcd24aa168a3f093bb613c70a8f84
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
4 ### We test every platform keyword. Sometimes good keywords are coupled
5 ### with bad version strings, so we use *-NOT patterns to ensure that
6 ### no "malformed platform" diagnostic appears in those cases.
8 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
9 # RUN: -platform_version \
10 # RUN: | FileCheck --check-prefix=FAIL-MISSING %s
11 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
12 # RUN: -platform_version wtf \
13 # RUN: | FileCheck --check-prefix=FAIL-MISSING %s
14 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
15 # RUN: -platform_version lolz 1.2.3.4.5 \
16 # RUN: | FileCheck --check-prefix=FAIL-MISSING %s
17 # FAIL-MISSING: -platform_version: missing argument
18 # FAIL-MISSING-NOT: malformed platform: {{.*}}
19 # FAIL-MISSING-NOT: malformed {{minimum|sdk}} version: {{.*}}
21 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
22 # RUN: -platform_version macOS -lfoo 2 \
23 # RUN: | FileCheck --check-prefix=FAIL-MALFORM %s
24 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
25 # RUN: -platform_version iOS 1 2.a \
26 # RUN: | FileCheck --check-prefix=FAIL-MALFORM %s
27 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
28 # RUN: -platform_version tvOS 1.2.3.4.5 10 \
29 # RUN: | FileCheck --check-prefix=FAIL-MALFORM %s
30 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
31 # RUN: -platform_version watchOS 10 1.2.3.4.5 \
32 # RUN: | FileCheck --check-prefix=FAIL-MALFORM %s
33 # FAIL-MALFORM-NOT: malformed platform: {{.*}}
34 # FAIL-MALFORM: malformed {{minimum|sdk}} version: {{.*}}
36 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
37 # RUN: -platform_version bridgeOS 1 5
38 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
39 # RUN: -platform_version "Mac Catalyst" 1.2 5.6
40 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
41 # RUN: -platform_version "iOS Simulator" 1.2.3 5.6.7
42 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
43 # RUN: -platform_version tvOS-Simulator 1.2.3.4 5.6.7.8
44 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
45 # RUN: -platform_version watchOS-Simulator 1 5
46 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
47 # RUN: -platform_version 1 1 5
48 # RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
49 # RUN: -platform_version 9 1 5
51 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
52 # RUN: -platform_version wtf 1 5 \
53 # RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s
54 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
55 # RUN: -platform_version 0 1 5 \
56 # RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s
57 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
58 # RUN: -platform_version 13 1 5 \
59 # RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s
60 # FAIL-PLATFORM: malformed platform: {{.*}}
61 # FAIL-PLATFORM-NOT: malformed {{minimum|sdk}} version: {{.*}}
63 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o -fatal_warnings 2>&1 \
64 # RUN: -platform_version iOS 14.0 15.0 \
65 # RUN: -platform_version macos 12.0 12.0 \
66 # RUN: | FileCheck --check-prefix=FAIL-TODO %s
67 # FAIL-TODO: lld supports writing zippered outputs only for macos and mac-catalyst
69 # RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \
70 # RUN: -platform_version bridgeOS 1 5 \
71 # RUN: -platform_version 'mac catalyst' 14.0 15.0 \
72 # RUN: -platform_version macos 12.0 12.0 \
73 # RUN: | FileCheck --check-prefix=FAIL-TOOMANY %s
74 # FAIL-TOOMANY: must specify -platform_version at most twice
76 .text
77 .global _main
78 _main:
79 mov $0, %eax
80 ret