1 // RUN: touch %t.o
2 
3 // RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
4 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
5 // RUN:   -### %t.o 2>&1 \
6 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
7 // RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinnew \
8 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
9 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
10 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s
11 // RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
12 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
13 // RUN:   -### %t.o 2>&1 \
14 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
15 // RUN: env SDKROOT=%S/Inputs/MacOSX10.14.sdk %clang \
16 // RUN:   -target x86_64-apple-macos10.13.0.1 -mlinker-version=520 \
17 // RUN:   -### %t.o 2>&1 \
18 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s
19 
20 // RUN: %clang -target arm64-apple-macos10.13 -fuse-ld= \
21 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
22 // RUN:   -### %t.o 2>&1 \
23 // RUN:   | FileCheck --check-prefix=ARM64_OLD %s
24 // RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld.darwinnew \
25 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
26 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
27 // RUN:   | FileCheck --check-prefix=ARM64_NEW %s
28 // RUN: %clang -target arm64-apple-macos10.13 -fuse-ld= \
29 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=520 \
30 // RUN:   -### %t.o 2>&1 \
31 // RUN:   | FileCheck --check-prefix=ARM64_NEW %s
32 // RUN: %clang -target arm64-apple-darwin19 -fuse-ld= \
33 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=520 \
34 // RUN:   -### %t.o 2>&1 \
35 // RUN:   | FileCheck --check-prefix=ARM64_NEW %s
36 // RUN: %clang -target arm64-apple-macos11.1 -fuse-ld= \
37 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=520 \
38 // RUN:   -### %t.o 2>&1 \
39 // RUN:   | FileCheck --check-prefix=ARM64_NEW_1 %s
40 
41 // LINKER-OLD: "-macosx_version_min" "10.13.0"
42 // LINKER-NEW: "-platform_version" "macos" "10.13.0" "10.14"
43 
44 // ARM64_NEW: "-platform_version" "macos" "11.0.0" "10.14"
45 // ARM64_NEW_1: "-platform_version" "macos" "11.1.0" "10.14"
46 // ARM64_OLD: "-macosx_version_min" "11.0.0"
47 
48 // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \
49 // RUN:   -### %t.o 2>&1 \
50 // RUN:   | FileCheck --check-prefix=NOSDK %s
51 // NOSDK: "-platform_version" "macos" "10.13.0" "0.0.0"
52