Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Mac Build Instructions | 1 # Mac Build Instructions |
| 2 | 2 |
| 3 [TOC] | 3 [TOC] |
| 4 | 4 |
| 5 ## Prerequisites | 5 ## Prerequisites |
| 6 | 6 |
| 7 * A Mac running 10.9+. | 7 * A Mac running 10.9+. |
| 8 * [Xcode](https://developer.apple.com/xcode), 5+. | 8 * [Xcode](https://developer.apple.com/xcode), 5+. |
| 9 * Install | 9 * Install |
| 10 [gclient](http://dev.chromium.org/developers/how-tos/install-depot-tools), | 10 [gclient](http://dev.chromium.org/developers/how-tos/install-depot-tools), |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 ## Using Xcode-Ninja Hybrid | 136 ## Using Xcode-Ninja Hybrid |
| 137 | 137 |
| 138 While using Xcode is unsupported, GYP supports a hybrid approach of using ninja | 138 While using Xcode is unsupported, GYP supports a hybrid approach of using ninja |
| 139 for building, but Xcode for editing and driving compilation. Xcode can still be | 139 for building, but Xcode for editing and driving compilation. Xcode can still be |
| 140 slow, but it runs fairly well even **with indexing enabled**. | 140 slow, but it runs fairly well even **with indexing enabled**. |
| 141 | 141 |
| 142 With hybrid builds, compilation is still handled by ninja, and can be run by the | 142 With hybrid builds, compilation is still handled by ninja, and can be run by the |
| 143 command line (e.g. ninja -C out/Debug chrome) or by choosing the chrome target | 143 command line (e.g. ninja -C out/Debug chrome) or by choosing the chrome target |
| 144 in the hybrid workspace and choosing build. | 144 in the hybrid workspace and choosing build. |
| 145 | 145 |
| 146 To use Xcode-Ninja Hybrid, set `GYP_GENERATORS=ninja,xcode-ninja`. | 146 To use Xcode-Ninja Hybrid, set GYP\_GENERATORS like the following: |
|
sdefresne
2016/03/02 17:29:54
I think you need a blank line between paragraphs a
tfarina
2016/03/02 17:35:02
Acknowledged.
| |
| 147 ```shell | |
| 148 export GYP_GENERATORS="ninja,xcode-ninja" | |
| 149 ``` | |
| 147 | 150 |
| 148 Due to the way Xcode parses ninja output paths, it's also necessary to change | 151 Due to the way Xcode parses ninja output paths, it's also necessary to change |
| 149 the main gyp location to anything two directories deep. Otherwise Xcode build | 152 the main gyp location to anything two directories deep. Otherwise Xcode build |
| 150 output will not be clickable. Adding | 153 output will not be clickable. |
| 151 `xcode_ninja_main_gyp=src/build/ninja/all.ninja.gyp` to your | 154 To make this change permanent, you can edit `chromium.gyp_env` (or create it if |
| 152 `GYP_GENERATOR_FLAGS` will fix this. | 155 it does not exists) and define GYP\_GENERATOR\_FLAGS. In general, to use hybrid |
| 156 mode, your `chromium.gyp_env` could contain the following: | |
| 157 ```json | |
|
sdefresne
2016/03/02 17:29:54
Same here.
tfarina
2016/03/02 17:35:02
Done.
| |
| 158 { | |
| 159 "GYP_GENERATORS" : "ninja,xcode-ninja", | |
| 160 "GYP_GENERATOR_FLAGS": | |
| 161 "xcode_project_version=3.2 " + | |
| 162 "xcode_ninja_main_gyp=src/build/ninja/all.ninja.gyp", | |
| 163 } | |
| 164 ``` | |
| 153 | 165 |
| 154 After generating the project files with gclient runhooks, open | 166 After, generate the project files with: |
| 155 `src/build/ninja/all.ninja.xcworkspace`. | 167 ```shell |
|
sdefresne
2016/03/02 17:29:54
Here.
tfarina
2016/03/02 17:35:02
Done.
| |
| 168 gclient runhooks | |
| 169 ``` | |
| 170 | |
| 171 And finally, open it: | |
| 172 ```shell | |
|
sdefresne
2016/03/02 17:29:54
And here.
tfarina
2016/03/02 17:35:02
Done.
| |
| 173 open build/ninja/all.ninja.xcworkspace | |
| 174 ``` | |
| 156 | 175 |
| 157 You may run into a problem where http://YES is opened as a new tab every time | 176 You may run into a problem where http://YES is opened as a new tab every time |
| 158 you launch Chrome. To fix this, open the scheme editor for the Run scheme, | 177 you launch Chrome. To fix this, open the scheme editor for the Run scheme, |
| 159 choose the Options tab, and uncheck "Allow debugging when using document | 178 choose the Options tab, and uncheck "Allow debugging when using document |
| 160 Versions Browser". When this option is checked, Xcode adds | 179 Versions Browser". When this option is checked, Xcode adds |
| 161 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` gets | 180 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` gets |
| 162 interpreted as a URL to open. | 181 interpreted as a URL to open. |
| 163 | 182 |
| 164 If you want to limit the number of targets visible, which is known to improve | 183 If you want to limit the number of targets visible, which is known to improve |
| 165 Xcode performance, add `xcode_ninja_executable_target_pattern=%target%` where | 184 Xcode performance, add `xcode_ninja_executable_target_pattern=%target%` where |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 be set in `/etc/sysctl.conf`: | 245 be set in `/etc/sysctl.conf`: |
| 227 | 246 |
| 228 echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf | 247 echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf |
| 229 | 248 |
| 230 Or edit the file directly. | 249 Or edit the file directly. |
| 231 | 250 |
| 232 If your `git --version` reports 2.6 or higher, the following may also improve | 251 If your `git --version` reports 2.6 or higher, the following may also improve |
| 233 performance of `git status`: | 252 performance of `git status`: |
| 234 | 253 |
| 235 git update-index --untracked-cache | 254 git update-index --untracked-cache |
| OLD | NEW |