Skip to content

Commit 3f88311

Browse files
authored
[Driver] Rearrange some Apple version testing (#94514)
There were four tests in Driver that actually tested bits of Driver and bits of CodeGen, and therefore had target restrictions. Rework those four tests into one Driver test (with no target restrictions) and two target-specific CodeGen tests.
1 parent fa9745e commit 3f88311

File tree

7 files changed

+52
-27
lines changed

7 files changed

+52
-27
lines changed

clang/test/Driver/apple-os-triples.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Test triple manipulations.
2+
3+
// RUN: %clang -### -c %s \
4+
// RUN: --target=i386-apple-darwin10 -mappletvsimulator-version-min=9.0 -arch x86_64 2>&1 | \
5+
// RUN: FileCheck %s -DARCH=x86_64 -DOS=tvos9.0.0-simulator
6+
// RUN: %clang -### -c %s \
7+
// RUN: --target=armv7s-apple-darwin10 -mappletvos-version-min=9.0 -arch arm64 2>&1 | \
8+
// RUN: FileCheck %s -DARCH=arm64 -DOS=tvos9.0.0
9+
// RUN: env TVOS_DEPLOYMENT_TARGET=9.0 %clang -### -c %s \
10+
// RUN: -isysroot SDKs/MacOSX10.9.sdk -target i386-apple-darwin10 -arch x86_64 2>&1 | \
11+
// RUN: FileCheck %s -DARCH=x86_64 -DOS=tvos9.0.0
12+
13+
// RUN: %clang -### -c %s \
14+
// RUN: --target=x86_64-apple-driverkit19.0 2>&1 | \
15+
// RUN: FileCheck %s -DARCH=x86_64 -DOS=driverkit19.0.0
16+
17+
// RUN: %clang -### -c %s \
18+
// RUN: --target=i386-apple-darwin10 -miphonesimulator-version-min=7.0 -arch i386 2>&1 | \
19+
// RUN: FileCheck %s -DARCH=i386 -DOS=ios7.0.0-simulator
20+
// RUN: %clang -### -c %s \
21+
// RUN: --target=armv7s-apple-darwin10 -miphoneos-version-min=7.0 -arch armv7s 2>&1 | \
22+
// RUN: FileCheck %s -DARCH=thumbv7s -DOS=ios7.0.0
23+
24+
// RUN: %clang -### -c %s \
25+
// RUN: --target=i386-apple-darwin10 -mwatchsimulator-version-min=2.0 -arch i386 2>&1 | \
26+
// RUN: FileCheck %s -DARCH=i386 -DOS=watchos2.0.0-simulator
27+
// RUN: %clang -### -c %s \
28+
// RUN: --target=armv7s-apple-darwin10 -mwatchos-version-min=2.0 -arch armv7k 2>&1 | \
29+
// RUN: FileCheck %s -DARCH=thumbv7k -DOS=watchos2.0.0
30+
31+
// CHECK: "-cc1" "-triple" "[[ARCH]]-apple-[[OS]]"

clang/test/Driver/appletvos-version-min.c

Lines changed: 0 additions & 8 deletions
This file was deleted.

clang/test/Driver/driverkit-version-min.c

Lines changed: 0 additions & 5 deletions
This file was deleted.

clang/test/Driver/ios-version-min.c

Lines changed: 0 additions & 7 deletions
This file was deleted.

clang/test/Driver/watchos-version-min.c

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
; Test emitting version_min directives.
2+
3+
; RUN: llc %s -filetype=asm -o - --mtriple arm64-apple-tvos9.0.0 | FileCheck %s --check-prefix=TVOS
4+
; RUN: llc %s -filetype=asm -o - --mtriple thumbv7s-apple-ios7.0.0 | FileCheck %s --check-prefix=IOS
5+
; RUN: llc %s -filetype=asm -o - --mtriple thumbv7k-apple-watchos2.0.0 | FileCheck %s --check-prefix=WATCHOS
6+
7+
; TVOS: .tvos_version_min 9, 0
8+
; IOS: .ios_version_min 7, 0
9+
; WATCHOS: .watchos_version_min 2, 0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
; Test emitting version_min directives.
2+
3+
; RUN: llc %s -filetype=asm -o - --mtriple x86_64-apple-tvos9.0.0-simulator | FileCheck %s --check-prefix=TVOS
4+
; RUN: llc %s -filetype=asm -o - --mtriple x86_64-apple-tvos9.0.0 | FileCheck %s --check-prefix=TVOS
5+
; RUN: llc %s -filetype=asm -o - --mtriple x86_64-apple-driverkit19.0.0 | FileCheck %s --check-prefix=DRIVERKIT
6+
; RUN: llc %s -filetype=asm -o - --mtriple i386-apple-ios7.0.0-simulator | FileCheck %s --check-prefix=IOS
7+
; RUN: llc %s -filetype=asm -o - --mtriple i386-apple-watchos2.0.0-simulator | FileCheck %s --check-prefix=WATCHOS
8+
9+
; TVOS: .tvos_version_min 9, 0
10+
; DRIVERKIT: .build_version driverkit, 19, 0
11+
; IOS: .ios_version_min 7, 0
12+
; WATCHOS: .watchos_version_min 2, 0

0 commit comments

Comments
 (0)