1 // Check that SDKROOT does not infer simulator on when it points to a regular 2 // SDK. 3 // REQUIRES: system-darwin && native 4 // 5 // RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk 6 // RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk 7 // RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ 8 // RUN: | FileCheck --check-prefix=CHECK-IPHONE %s 9 // RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk IPHONEOS_DEPLOYMENT_TARGET=8.0 %clang %s -mlinker-version=400 -### 2>&1 \ 10 // RUN: | FileCheck --check-prefix=CHECK-IPHONE %s 11 // CHECK-IPHONE: clang 12 // CHECK-IPHONE: "-cc1" 13 // CHECK-IPHONE: -apple-ios8.0.0" 14 // CHECK-IPHONE: ld 15 // CHECK-IPHONE: "-iphoneos_version_min" "8.0.0" 16 // 17 // 18 // RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk 19 // RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk 20 // RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ 21 // RUN: | FileCheck --check-prefix=CHECK-SIMULATOR %s 22 // 23 // CHECK-SIMULATOR: clang 24 // CHECK-SIMULATOR: "-cc1" 25 // CHECK-SIMULATOR: -apple-ios8.0.0-simulator" 26 // CHECK-SIMULATOR: ld 27 // CHECK-SIMULATOR: "-ios_simulator_version_min" "8.0.0" 28 // 29 // 30 // RUN: rm -rf %t/SDKs/iPhoneSimulator14.0.sdk 31 // RUN: mkdir -p %t/SDKs/iPhoneSimulator14.0.sdk 32 // RUN: env SDKROOT=%t/SDKs/iPhoneSimulator14.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ 33 // RUN: | FileCheck --check-prefix=CHECK-SIMULATOR-ARM64 %s 34 // 35 // CHECK-SIMULATOR-ARM64: clang 36 // CHECK-SIMULATOR-ARM64: "-cc1" 37 // CHECK-SIMULATOR-ARM64: -apple-ios14.0.0-simulator" 38 // CHECK-SIMULATOR-ARM64: ld 39 // CHECK-SIMULATOR-ARM64: "-ios_simulator_version_min" "14.0.0" 40 // 41 // 42 // RUN: rm -rf %t/SDKs/WatchOS3.0.sdk 43 // RUN: mkdir -p %t/SDKs/WatchOS3.0.sdk 44 // RUN: env SDKROOT=%t/SDKs/WatchOS3.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ 45 // RUN: | FileCheck --check-prefix=CHECK-WATCH %s 46 // RUN: env WATCHOS_DEPLOYMENT_TARGET=3.0 %clang %s -isysroot %t/SDKs/WatchOS3.0.sdk -mlinker-version=400 -### 2>&1 \ 47 // RUN: | FileCheck --check-prefix=CHECK-WATCH %s 48 // 49 // CHECK-WATCH: clang 50 // CHECK-WATCH: "-cc1" 51 // CHECK-WATCH: -apple-watchos3.0.0" 52 // CHECK-WATCH: ld 53 // CHECK-WATCH: "-watchos_version_min" "3.0.0" 54 // 55 // 56 // RUN: rm -rf %t/SDKs/WatchSimulator3.0.sdk 57 // RUN: mkdir -p %t/SDKs/WatchSimulator3.0.sdk 58 // RUN: env SDKROOT=%t/SDKs/WatchSimulator3.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ 59 // RUN: | FileCheck --check-prefix=CHECK-WATCH-SIMULATOR %s 60 // 61 // CHECK-WATCH-SIMULATOR: clang 62 // CHECK-WATCH-SIMULATOR: "-cc1" 63 // CHECK-WATCH-SIMULATOR: -apple-watchos3.0.0-simulator" 64 // CHECK-WATCH-SIMULATOR: ld 65 // CHECK-WATCH-SIMULATOR: "-watchos_simulator_version_min" "3.0.0" 66 // 67 // 68 // RUN: rm -rf %t/SDKs/WatchSimulator7.0.sdk 69 // RUN: mkdir -p %t/SDKs/WatchSimulator7.0.sdk 70 // RUN: env SDKROOT=%t/SDKs/WatchSimulator7.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ 71 // RUN: | FileCheck --check-prefix=CHECK-WATCH-SIMULATOR-ARM64 %s 72 // 73 // CHECK-WATCH-SIMULATOR-ARM64: clang 74 // CHECK-WATCH-SIMULATOR-ARM64: "-cc1" 75 // CHECK-WATCH-SIMULATOR-ARM64: -apple-watchos7.0.0-simulator" 76 // CHECK-WATCH-SIMULATOR-ARM64: ld 77 // CHECK-WATCH-SIMULATOR-ARM64: "-watchos_simulator_version_min" "7.0.0" 78 // 79 // 80 // RUN: rm -rf %t/SDKs/AppleTVOS10.0.sdk 81 // RUN: mkdir -p %t/SDKs/AppleTVOS10.0.sdk 82 // RUN: env SDKROOT=%t/SDKs/AppleTVOS10.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ 83 // RUN: | FileCheck --check-prefix=CHECK-TV %s 84 // 85 // CHECK-TV: clang 86 // CHECK-TV: "-cc1" 87 // CHECK-TV: -apple-tvos10.0.0" 88 // CHECK-TV: ld 89 // CHECK-TV: "-tvos_version_min" "10.0.0" 90 // 91 // 92 // RUN: rm -rf %t/SDKs/AppleTVSimulator10.0.sdk 93 // RUN: mkdir -p %t/SDKs/AppleTVSimulator10.0.sdk 94 // RUN: env SDKROOT=%t/SDKs/AppleTVSimulator10.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ 95 // RUN: | FileCheck --check-prefix=CHECK-TV-SIMULATOR %s 96 // 97 // CHECK-TV-SIMULATOR: clang 98 // CHECK-TV-SIMULATOR: "-cc1" 99 // CHECK-TV-SIMULATOR: -apple-tvos10.0.0-simulator" 100 // CHECK-TV-SIMULATOR: ld 101 // CHECK-TV-SIMULATOR: "-tvos_simulator_version_min" "10.0.0" 102 // 103 // 104 // RUN: rm -rf %t/SDKs/AppleTVSimulator14.0.sdk 105 // RUN: mkdir -p %t/SDKs/AppleTVSimulator14.0.sdk 106 // RUN: env SDKROOT=%t/SDKs/AppleTVSimulator14.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ 107 // RUN: | FileCheck --check-prefix=CHECK-TV-SIMULATOR-ARM64 %s 108 // 109 // CHECK-TV-SIMULATOR-ARM64: clang 110 // CHECK-TV-SIMULATOR-ARM64: "-cc1" 111 // CHECK-TV-SIMULATOR-ARM64: -apple-tvos14.0.0-simulator" 112 // CHECK-TV-SIMULATOR-ARM64: ld 113 // CHECK-TV-SIMULATOR-ARM64: "-tvos_simulator_version_min" "14.0.0" 114 115