Skip to content

Commit be88a20

Browse files
committed
[driver][darwin] Use explicit -mlinker-version in the -platform_version tests
The driver actually adds a default -mlinker-version, based on HOST_LINK_VERSION cmake variable. The tests should be explicit about which version they're using to trigger the right behavior.
1 parent 36bdc3d commit be88a20

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

clang/test/Driver/darwin-ld-platform-version-ios.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64-apple-ios12.3 -isysroot %S/Inputs/iPhoneOS13.0.sdk -### %t.o 2>&1 \
3+
// RUN: %clang -target arm64-apple-ios12.3 -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
44
// RUN: | FileCheck %s
5-
// RUN: %clang -target x86_64-apple-ios13-simulator -isysroot %S/Inputs/iPhoneOS13.0.sdk -### %t.o 2>&1 \
5+
// RUN: %clang -target x86_64-apple-ios13-simulator -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=SIMUL %s
77

88
// CHECK: "-platform_version" "ios" "12.3.0" "13.0"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target x86_64-apple-macos10.13 -isysroot %S/Inputs/MacOSX10.14.sdk -### %t.o 2>&1 \
3+
// RUN: %clang -target x86_64-apple-macos10.13 -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 -### %t.o 2>&1 \
44
// RUN: | FileCheck %s
55
// RUN: env SDKROOT=%S/Inputs/MacOSX10.14.sdk %clang -target x86_64-apple-macos10.13.0.1 -mlinker-version=520 -### %t.o 2>&1 \
66
// RUN: | FileCheck %s
77

88
// CHECK: "-platform_version" "macos" "10.13.0" "10.14"
99

10-
// RUN: %clang -target x86_64-apple-macos10.13 -### %t.o 2>&1 \
10+
// RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 -### %t.o 2>&1 \
1111
// RUN: | FileCheck --check-prefix=NOSDK %s
1212
// NOSDK: "-platform_version" "macos" "10.13.0" "0.0.0"

clang/test/Driver/darwin-ld-platform-version-tvos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64-apple-tvos12.3 -isysroot %S/Inputs/iPhoneOS13.0.sdk -### %t.o 2>&1 \
3+
// RUN: %clang -target arm64-apple-tvos12.3 -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
44
// RUN: | FileCheck %s
5-
// RUN: %clang -target x86_64-apple-tvos13-simulator -isysroot %S/Inputs/iPhoneOS13.0.sdk -### %t.o 2>&1 \
5+
// RUN: %clang -target x86_64-apple-tvos13-simulator -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=SIMUL %s
77

88
// CHECK: "-platform_version" "tvos" "12.3.0" "13.0"

clang/test/Driver/darwin-ld-platform-version-watchos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64_32-apple-watchos5.2 -isysroot %S/Inputs/WatchOS6.0.sdk -### %t.o 2>&1 \
3+
// RUN: %clang -target arm64_32-apple-watchos5.2 -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
44
// RUN: | FileCheck %s
5-
// RUN: %clang -target x86_64-apple-watchos6-simulator -isysroot %S/Inputs/WatchOS6.0.sdk -### %t.o 2>&1 \
5+
// RUN: %clang -target x86_64-apple-watchos6-simulator -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=520 -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=SIMUL %s
77

88
// CHECK: "-platform_version" "watchos" "5.2.0" "6.0.0"

0 commit comments

Comments
 (0)