-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag to set min os version on darwin platforms
- Loading branch information
Showing
5 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// The test checks that the triple contain minimum OS version if provided. | ||
|
||
// RUN: %{ispc} %s --nostdlib --target-os=macos --target=avx2 --arch=x86-64 --emit-llvm-text --nowrap -o - | FileCheck %s --check-prefix=CHECK-MACOS-DEFAULT | ||
// RUN: %{ispc} %s --nostdlib --target-os=macos --target=avx2 --arch=x86-64 --emit-llvm-text --nowrap --darwin-version-min=15.0 -o - | FileCheck %s --check-prefix=CHECK-MACOS-VER | ||
// RUN: %{ispc} %s --nostdlib --target-os=macos --target=avx2 --arch=x86-64 --emit-llvm-text --nowrap --darwin-version-min="" -o - | FileCheck %s --check-prefix=CHECK-MACOS-VER-UNSET | ||
// RUN: not %{ispc} %s --nostdlib --target-os=macos --emit-llvm-text --nowrap --target=host --darwin-version-min=a.b -o - 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-VER | ||
|
||
// REQUIRES: MACOS_HOST && X86_ENABLED | ||
|
||
// CHECK-MACOS-DEFAULT: target triple = {{.*}}-apple-macosx10.12" | ||
// CHECK-MACOS-VER: target triple = {{.*}}-apple-macosx15.0" | ||
// CHECK-MACOS-VER-UNSET: target triple = {{.*}}-apple-macosx" | ||
|
||
// CHECK-ERROR-VER: Error: Invalid version format: "a.b". Use <major_ver.minor_ver>. | ||
uniform int j; | ||
|
||
int foo(int i) { return i + 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// The test checks that the triple contain minimum OS version if provided. | ||
// Note: iOS target is enabled one ARM platforms only. | ||
|
||
// RUN: %{ispc} %s --nostdlib --target-os=ios --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 -o - | FileCheck %s --check-prefix=CHECK-IOS-DEFAULT | ||
// RUN: %{ispc} %s --nostdlib --target-os=ios --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 --darwin-version-min=15.0 -o - | FileCheck %s --check-prefix=CHECK-IOS-VER | ||
// RUN: %{ispc} %s --nostdlib --target-os=ios --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 --darwin-version-min="" -o - | FileCheck %s --check-prefix=CHECK-IOS-VER-UNSET | ||
// RUN: %{ispc} %s --nostdlib --target-os=macos --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 -o - | FileCheck %s --check-prefix=CHECK-MACOS-DEFAULT | ||
// RUN: %{ispc} %s --nostdlib --target-os=macos --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 --darwin-version-min=15.0 -o - | FileCheck %s --check-prefix=CHECK-MACOS-VER | ||
// RUN: %{ispc} %s --nostdlib --target-os=macos --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 --darwin-version-min="" -o - | FileCheck %s --check-prefix=CHECK-MACOS-VER-UNSET | ||
|
||
// RUN: not %{ispc} %s --nostdlib --target-os=ios --arch=aarch64 --emit-llvm-text --nowrap --target=neon-i32x4 --darwin-version-min=a.b -o - 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR-VER | ||
|
||
// REQUIRES: MACOS_HOST && MACOS_ARM_ENABLED | ||
|
||
// CHECK-IOS-DEFAULT: target triple = {{.*}}-apple-ios11.0" | ||
// CHECK-IOS-VER: target triple = {{.*}}-apple-ios15.0" | ||
// CHECK-IOS-VER-UNSET: target triple = {{.*}}-apple-ios" | ||
|
||
// CHECK-MACOS-DEFAULT: target triple = {{.*}}-apple-macosx11.0" | ||
// CHECK-MACOS-VER: target triple = {{.*}}-apple-macosx15.0" | ||
// CHECK-MACOS-VER-UNSET: target triple = {{.*}}-apple-macosx" | ||
|
||
// CHECK-ERROR-VER: Error: Invalid version format: "a.b". Use <major_ver.minor_ver>. | ||
uniform int j; | ||
|
||
int foo(int i) { return i + 1; } |