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

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

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 7 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/find_signing_identity.py ('k') | build/config/ios/rules.gni » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..31885e77c282b0796950cd7896f386c72233b478
--- /dev/null
+++ b/build/config/ios/ios_sdk.gni
@@ -0,0 +1,73 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+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 = ""
+ ios_sdk_name = ""
+ ios_sdk_version = ""
+ ios_sdk_platform = ""
+ xcode_version = ""
+ xcode_build = ""
+ machine_os_build = ""
+
+ use_ios_simulator = target_cpu == "x86" || target_cpu == "x64"
+
+ # Version of iOS that we're targeting.
+ ios_deployment_target = "9.0"
+
+ # The iOS Code signing identity to use
+ # TODO(GYP), TODO(sdfresne): Consider having a separate
+ # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer.
+ ios_enable_code_signing = true
+ ios_code_signing_identity = ""
+}
+
+if (ios_sdk_path == "") {
+ # Compute default target.
+ if (use_ios_simulator) {
+ ios_sdk_name = "iphonesimulator"
+ ios_sdk_platform = "iPhoneSimulator"
+ } else {
+ ios_sdk_name = "iphoneos"
+ ios_sdk_platform = "iPhoneOS"
+ }
+ _ios_sdk_result =
+ exec_script("//build/config/mac/sdk_info.py", [ ios_sdk_name ], "scope")
+ ios_sdk_path = _ios_sdk_result.sdk_path
+ ios_sdk_version = _ios_sdk_result.sdk_version
+ ios_sdk_build = _ios_sdk_result.sdk_build
+ xcode_version = _ios_sdk_result.xcode_version
+ xcode_build = _ios_sdk_result.xcode_build
+ machine_os_build = _ios_sdk_result.machine_os_build
+ if (use_ios_simulator) {
+ # This is weird, but Xcode sets DTPlatformBuild to an empty field for
+ # simulator builds.
+ ios_platform_build = ""
+ } else {
+ ios_platform_build = ios_sdk_build
+ }
+}
+
+if (use_ios_simulator) {
+ # Always disable code signing on the simulator
+ ios_enable_code_signing = false
+ ios_code_signing_identity = ""
+}
+
+if (ios_enable_code_signing) {
+ # If an identity is not provided, look for one on the host
+ if (ios_code_signing_identity == "") {
+ _ios_identities = exec_script("find_signing_identity.py", [], "list lines")
+ ios_code_signing_identity = _ios_identities[0]
+ }
+
+ if (ios_code_signing_identity == "") {
+ print("Tried to prepare a device build without specifying a code signing")
+ print("identity and could not detect one automatically either.")
+ print("TIP: Simulator builds don't require code signing...")
+ assert(false)
+ }
+}
« 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