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

Side by Side Diff: docs/ios_build_instructions.md

Issue 1904773003: Documentation: Update iOS build docs to include instructions for gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Advise setting target_os instead of use_ios_simulator. 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # iOS Build Instructions 1 # iOS Build Instructions
2 2
3 **Note:** Upstreaming of iOS code is still a work in progress. In particular, 3 **Note:** Upstreaming of iOS code is still a work in progress. In particular,
4 note that **it is not currently possible to build an actual Chromium app.** 4 note that **it is not currently possible to build an actual Chromium app.**
5 Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around 5 Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
6 the web layer), and various unit tests. 6 the web layer), and various unit tests.
7 7
8 ## Prerequisites 8 ## Prerequisites
9 9
10 * A Mac with a version of OS X capable of running the latest version 10 * A Mac with a version of OS X capable of running the latest version
11 of Xcode. 11 of Xcode.
12 * The latest version of [Xcode](https://developer.apple.com/xcode/), 12 * The latest version of [Xcode](https://developer.apple.com/xcode/),
13 including the current iOS SDK. 13 including the current iOS SDK.
14 * The current version of the JDK (required for the closure compiler). 14 * The current version of the JDK (required for the closure compiler).
15 * [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tool s). 15 * [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tool s).
16 16
17 ## Setting Up 17 ## Setting Up
18 18
19 ### With GYP
20
19 In the directory where you are going to check out the code, create a 21 In the directory where you are going to check out the code, create a
20 `chromium.gyp_env` to set the build to use iOS targets (and to use 22 `chromium.gyp_env` to set the build to use iOS targets (and to use
21 hybrid builds; see [Building](#Building) below): 23 hybrid builds; see [Building](#Building) below):
22 24
23 ```shell 25 ```shell
24 cat > chromium.gyp_env <<EOF 26 cat > chromium.gyp_env <<EOF
25 { 27 {
26 "GYP_DEFINES": "OS=ios", 28 "GYP_DEFINES": "OS=ios",
27 "GYP_GENERATORS": "ninja,xcode-ninja", 29 "GYP_GENERATORS": "ninja,xcode-ninja",
28 } 30 }
29 EOF 31 EOF
30 ``` 32 ```
31 33
32 If you aren't set up to sign iOS build products via a developer account, 34 If you aren't set up to sign iOS build products via a developer account,
33 you should instead use: 35 you should instead use:
34 36
35 ```shell 37 ```shell
36 cat > chromium.gyp_env <<EOF 38 cat > chromium.gyp_env <<EOF
37 { 39 {
38 "GYP_DEFINES": "OS=ios chromium_ios_signing=0", 40 "GYP_DEFINES": "OS=ios chromium_ios_signing=0",
39 "GYP_GENERATORS": "ninja,xcode-ninja", 41 "GYP_GENERATORS": "ninja,xcode-ninja",
40 } 42 }
41 EOF 43 EOF
42 ``` 44 ```
43 45
46 ### With GN
47
48 Use `gn args out/Debug-iphonesimulator` (or replace
49 `out/Debug-iphonesimulator` with your chosen `out/` directory) to open up an
50 editor to set the following gn variables and regenerate:
51
52 ```
53 # Set to true if you have a valid code signing key.
54 ios_enable_code_signing = false
55 target_os = "ios"
56 # Set to "x86", "x64", "arm", "armv7", "arm64". "x86" and "x64" will create a
57 # build to run on the iOS simulator (and set use_ios_simulator = true), all
58 # others are for an iOS device.
59 target_cpu = "x64"
60 # Release vs debug build.
61 is_debug = true
62 ```
63
64 ### API Keys
65
44 Before you build, you may want to 66 Before you build, you may want to
45 [install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-to s/api-keys) 67 [install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-to s/api-keys)
46 so that Chrome-integrated Google services work. This step is optional if you 68 so that Chrome-integrated Google services work. This step is optional if you
47 aren't testing those features. 69 aren't testing those features.
48 70
49 ## Getting the Code 71 ## Getting the Code
50 72
51 Next, [check out the 73 Next, [check out the
52 code](https://www.chromium.org/developers/how-tos/get-the-code), with: 74 code](https://www.chromium.org/developers/how-tos/get-the-code), with:
53 75
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ``` 115 ```
94 116
95 ## Converting an existing Mac checkout into an iOS checkout 117 ## Converting an existing Mac checkout into an iOS checkout
96 118
97 If you want to convert your Mac checkout into an iOS checkout, follow the steps 119 If you want to convert your Mac checkout into an iOS checkout, follow the steps
98 below: 120 below:
99 121
100 1. Add `target_os = [ "ios" ]` to the bottom of your `chromium/.gclient` 122 1. Add `target_os = [ "ios" ]` to the bottom of your `chromium/.gclient`
101 file. 123 file.
102 124
103 2. Make sure you have the following in your `chromium/chromium.gyp_env` 125 2. For gyp, make sure you have the following in your
104 file (removing the `chromium_ios_signing=0` if you want to make 126 `chromium/chromium.gyp_env` file (removing the `chromium_ios_signing=0` if you
105 developer-signed builds): 127 want to make developer-signed builds):
106 128
107 ```json 129 ```json
108 { 130 {
109 "GYP_DEFINES" : "OS=ios chromium_ios_signing=0", 131 "GYP_DEFINES" : "OS=ios chromium_ios_signing=0",
110 "GYP_GENERATORS" : "ninja,xcode-ninja", 132 "GYP_GENERATORS" : "ninja,xcode-ninja",
111 } 133 }
112 ``` 134 ```
113 135
136 For gn, add the arguments specified [above](#With-GN) to your gn setup.
137
114 3. Make sure to sync again to fetch the iOS specific dependencies and 138 3. Make sure to sync again to fetch the iOS specific dependencies and
115 regenerate build rules using: 139 regenerate build rules using:
116 140
117 ```shell 141 ```shell
118 gclient sync 142 gclient sync
119 ``` 143 ```
120 144
121 ## Troubleshooting 145 ## Troubleshooting
122 146
123 If your build fails, check the iOS columns of [the Mac 147 If your build fails, check the iOS columns of [the Mac
124 waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to 148 waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to
125 see if the bots are green. In general they should be, since failures on those 149 see if the bots are green. In general they should be, since failures on those
126 bots will close the tree. 150 bots will close the tree.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698