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

Unified Diff: build/config/ios/ios_sdk.gni

Issue 149163005: Work on GN iOS build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/ios/BUILD.gn ('k') | build/config/linux/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/ios_sdk.gni
diff --git a/build/config/ios/ios_sdk.gni b/build/config/ios/ios_sdk.gni
index f941f3ce09938d91bbd9a0759aa2e7b0f9ed7f85..7acbaaa17d78c5e5a31372172261707e53fcb422 100644
--- a/build/config/ios/ios_sdk.gni
+++ b/build/config/ios/ios_sdk.gni
@@ -2,9 +2,31 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# TODO(brettw) support "iphoneos" in addition to the simulator. May also need
-# support for common.gypi's "ios_sdk" variable (seems to be a version number)
-# and ios_sdk_path (argument that overrides the one returned below).
-ios_sdk_result =
- exec_script("ios_sdk.py", [ "iphonesimulator" ], "list lines")
-ios_sdk_path = ios_sdk_result[0]
+declare_args() {
+ # SDK path to use. When empty this will use the default SDK based on the
+ # value of use_ios_simulator.
+ ios_sdk_path = ""
+
+ # Set to true when targeting a simulator build on iOS. False means that the
+ # target is for running on the device.
+ use_ios_simulator = true
+
+ ios_deployment_target = "6.0"
+}
+
+if (!is_gyp_xcode_generator) {
+ # The Ninja build currently only targets the simulator.
+ assert(use_ios_simulator, "You can't do an iOS device build using Ninja yet.")
+}
+
+if (ios_sdk_path == "") {
+ # Compute default target.
+ if (use_ios_simulator) {
+ _ios_sdk_to_query = "iphonesimulator"
+ } else {
+ _ios_sdk_to_query = "iphoneos"
+ }
+ _ios_sdk_result =
+ exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines")
+ ios_sdk_path = _ios_sdk_result[0]
+}
« no previous file with comments | « build/config/ios/BUILD.gn ('k') | build/config/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698