Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: build/config/ios/ios_sdk.gni

Issue 2452593004: Correct iOS GN hermetic support. (Closed)
Patch Set: Changes for sdefresne Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/ios/find_signing_identity.py ('k') | build/config/ios/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/toolchain/toolchain.gni")
6
5 declare_args() { 7 declare_args() {
6 # SDK path to use. When empty this will use the default SDK based on the 8 # SDK path to use. When empty this will use the default SDK based on the
7 # value of use_ios_simulator. 9 # value of use_ios_simulator.
8 ios_sdk_path = "" 10 ios_sdk_path = ""
9 ios_sdk_name = "" 11 ios_sdk_name = ""
10 ios_sdk_version = "" 12 ios_sdk_version = ""
11 ios_sdk_platform = "" 13 ios_sdk_platform = ""
12 ios_sdk_platform_path = "" 14 ios_sdk_platform_path = ""
13 xcode_version = "" 15 xcode_version = ""
14 xcode_build = "" 16 xcode_build = ""
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 78
77 if (ios_sdk_path == "") { 79 if (ios_sdk_path == "") {
78 # Compute default target. 80 # Compute default target.
79 if (use_ios_simulator) { 81 if (use_ios_simulator) {
80 ios_sdk_name = "iphonesimulator" 82 ios_sdk_name = "iphonesimulator"
81 ios_sdk_platform = "iPhoneSimulator" 83 ios_sdk_platform = "iPhoneSimulator"
82 } else { 84 } else {
83 ios_sdk_name = "iphoneos" 85 ios_sdk_name = "iphoneos"
84 ios_sdk_platform = "iPhoneOS" 86 ios_sdk_platform = "iPhoneOS"
85 } 87 }
86 _ios_sdk_result = 88
87 exec_script("//build/config/mac/sdk_info.py", [ ios_sdk_name ], "scope") 89 ios_sdk_info_args = []
90 if (!use_system_xcode) {
91 ios_sdk_info_args += [
92 "--developer_dir",
93 hermetic_xcode_path,
94 ]
95 }
96 ios_sdk_info_args += [ ios_sdk_name ]
97 script_name = "//build/config/mac/sdk_info.py"
98 _ios_sdk_result = exec_script(script_name, ios_sdk_info_args, "scope")
88 ios_sdk_path = _ios_sdk_result.sdk_path 99 ios_sdk_path = _ios_sdk_result.sdk_path
89 ios_sdk_version = _ios_sdk_result.sdk_version 100 ios_sdk_version = _ios_sdk_result.sdk_version
90 ios_sdk_platform_path = _ios_sdk_result.sdk_platform_path 101 ios_sdk_platform_path = _ios_sdk_result.sdk_platform_path
91 ios_sdk_build = _ios_sdk_result.sdk_build 102 ios_sdk_build = _ios_sdk_result.sdk_build
92 xcode_version = _ios_sdk_result.xcode_version 103 xcode_version = _ios_sdk_result.xcode_version
93 xcode_build = _ios_sdk_result.xcode_build 104 xcode_build = _ios_sdk_result.xcode_build
94 machine_os_build = _ios_sdk_result.machine_os_build 105 machine_os_build = _ios_sdk_result.machine_os_build
95 if (use_ios_simulator) { 106 if (use_ios_simulator) {
96 # This is weird, but Xcode sets DTPlatformBuild to an empty field for 107 # This is weird, but Xcode sets DTPlatformBuild to an empty field for
97 # simulator builds. 108 # simulator builds.
98 ios_platform_build = "" 109 ios_platform_build = ""
99 } else { 110 } else {
100 ios_platform_build = ios_sdk_build 111 ios_platform_build = ios_sdk_build
101 } 112 }
102 } 113 }
103 114
104 if (ios_enable_code_signing && !use_ios_simulator) { 115 if (ios_enable_code_signing && !use_ios_simulator) {
116 find_signing_identity_args = []
117 if (!use_system_xcode) {
118 find_signing_identity_args += [
119 "--developer_dir",
120 hermetic_xcode_path,
121 ]
122 }
123
105 # If an identity is not provided, look for one on the host 124 # If an identity is not provided, look for one on the host
106 if (ios_code_signing_identity == "") { 125 if (ios_code_signing_identity == "") {
107 _ios_identities = exec_script("find_signing_identity.py", [], "list lines") 126 _ios_identities = exec_script("find_signing_identity.py",
127 find_signing_identity_args,
128 "list lines")
108 ios_code_signing_identity = _ios_identities[0] 129 ios_code_signing_identity = _ios_identities[0]
109 } 130 }
110 131
111 if (ios_code_signing_identity == "") { 132 if (ios_code_signing_identity == "") {
112 print("Tried to prepare a device build without specifying a code signing") 133 print("Tried to prepare a device build without specifying a code signing")
113 print("identity and could not detect one automatically either.") 134 print("identity and could not detect one automatically either.")
114 print("TIP: Simulator builds don't require code signing...") 135 print("TIP: Simulator builds don't require code signing...")
115 assert(false) 136 assert(false)
116 } 137 }
117 } 138 }
OLDNEW
« no previous file with comments | « build/config/ios/find_signing_identity.py ('k') | build/config/ios/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698