Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 declare_args() { | 5 declare_args() { |
| 6 # SDK path to use. When empty this will use the default SDK based on the | 6 # SDK path to use. When empty this will use the default SDK based on the |
| 7 # value of use_ios_simulator. | 7 # value of use_ios_simulator. |
| 8 ios_sdk_path = "" | 8 ios_sdk_path = "" |
| 9 ios_sdk_name = "" | 9 ios_sdk_name = "" |
| 10 ios_sdk_version = "" | 10 ios_sdk_version = "" |
| 11 ios_sdk_platform = "" | 11 ios_sdk_platform = "" |
| 12 xcode_version = "" | 12 xcode_version = "" |
| 13 xcode_build = "" | 13 xcode_build = "" |
| 14 machine_os_build = "" | 14 machine_os_build = "" |
| 15 | 15 |
| 16 use_ios_simulator = target_cpu == "x86" || target_cpu == "x64" | 16 use_ios_simulator = target_cpu == "x86" || target_cpu == "x64" |
| 17 | 17 |
| 18 # Version of iOS that we're targeting. | 18 # Version of iOS that we're targeting. |
| 19 ios_deployment_target = "9.0" | 19 ios_deployment_target = "9.0" |
| 20 | 20 |
| 21 # The iOS Code signing identity to use | 21 # The iOS Code signing identity to use |
| 22 # TODO(GYP), TODO(sdfresne): Consider having a separate | 22 # TODO(GYP), TODO(sdfresne): Consider having a separate |
| 23 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer. | 23 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer. |
| 24 ios_enable_code_signing = true | 24 ios_enable_code_signing = true |
| 25 ios_code_signing_identity = "" | 25 ios_code_signing_identity = "" |
| 26 | |
| 27 # If non-empty, this list must contain valid cpu architecture, and the final | |
|
brettw
2016/07/12 20:24:32
Here it might be good to give an example of settin
sdefresne
2016/07/13 08:22:26
Done.
sdefresne
2016/07/13 08:22:27
Done.
| |
| 28 # build will be a multi-architecture build (aka fat build) supporting the | |
| 29 # main $target_cpu architecture and all of $additional_target_cpus. | |
| 30 additional_target_cpus = [] | |
| 31 } | |
| 32 | |
| 33 assert(custom_toolchain == "" || additional_target_cpus == [], | |
| 34 "cannot define both custom_toolchain and additional_target_cpus") | |
| 35 | |
| 36 # Initialize additional_toolchains from additional_target_cpus. Assert here | |
| 37 # that the list does not contains $target_cpu nor duplicates as this would | |
| 38 # cause weird errors during the build. | |
| 39 additional_toolchains = [] | |
| 40 if (additional_target_cpus != []) { | |
| 41 foreach(_additional_target_cpu, additional_target_cpus) { | |
| 42 assert(_additional_target_cpu != target_cpu, | |
| 43 "target_cpu must not be listed in additional_target_cpus") | |
| 44 | |
| 45 _toolchain = "//build/toolchain/mac:ios_clang_$_additional_target_cpu" | |
| 46 foreach(_additional_toolchain, additional_toolchains) { | |
| 47 assert(_toolchain != _additional_toolchain, | |
| 48 "additional_target_cpus must not contains duplicate values") | |
| 49 } | |
| 50 | |
| 51 additional_toolchains += [ _toolchain ] | |
| 52 } | |
| 26 } | 53 } |
| 27 | 54 |
| 28 if (ios_sdk_path == "") { | 55 if (ios_sdk_path == "") { |
| 29 # Compute default target. | 56 # Compute default target. |
| 30 if (use_ios_simulator) { | 57 if (use_ios_simulator) { |
| 31 ios_sdk_name = "iphonesimulator" | 58 ios_sdk_name = "iphonesimulator" |
| 32 ios_sdk_platform = "iPhoneSimulator" | 59 ios_sdk_platform = "iPhoneSimulator" |
| 33 } else { | 60 } else { |
| 34 ios_sdk_name = "iphoneos" | 61 ios_sdk_name = "iphoneos" |
| 35 ios_sdk_platform = "iPhoneOS" | 62 ios_sdk_platform = "iPhoneOS" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 64 ios_code_signing_identity = _ios_identities[0] | 91 ios_code_signing_identity = _ios_identities[0] |
| 65 } | 92 } |
| 66 | 93 |
| 67 if (ios_code_signing_identity == "") { | 94 if (ios_code_signing_identity == "") { |
| 68 print("Tried to prepare a device build without specifying a code signing") | 95 print("Tried to prepare a device build without specifying a code signing") |
| 69 print("identity and could not detect one automatically either.") | 96 print("identity and could not detect one automatically either.") |
| 70 print("TIP: Simulator builds don't require code signing...") | 97 print("TIP: Simulator builds don't require code signing...") |
| 71 assert(false) | 98 assert(false) |
| 72 } | 99 } |
| 73 } | 100 } |
| OLD | NEW |