OLD | NEW |
1 # Checking out and building Chromium for Mac | 1 # Checking out and building Chromium for Mac |
2 | 2 |
3 There are instructions for other platforms linked from the | 3 There are instructions for other platforms linked from the |
4 [get the code](get_the_code.md) page. | 4 [get the code](get_the_code.md) page. |
5 | 5 |
6 ## Instructions for Google Employees | 6 ## Instructions for Google Employees |
7 | 7 |
8 Are you a Google employee? See | 8 Are you a Google employee? See |
9 [go/building-chrome](https://goto.google.com/building-chrome) instead. | 9 [go/building-chrome](https://goto.google.com/building-chrome) instead. |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` | 224 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` |
225 gets interpreted as a URL to open. | 225 gets interpreted as a URL to open. |
226 | 226 |
227 If you have problems building, join us in `#chromium` on `irc.freenode.net` and | 227 If you have problems building, join us in `#chromium` on `irc.freenode.net` and |
228 ask there. Be sure that the | 228 ask there. Be sure that the |
229 [waterfall](https://build.chromium.org/buildbot/waterfall/) is green and the | 229 [waterfall](https://build.chromium.org/buildbot/waterfall/) is green and the |
230 tree is open before checking out. This will increase your chances of success. | 230 tree is open before checking out. This will increase your chances of success. |
231 | 231 |
232 ### Improving performance of `git status` | 232 ### Improving performance of `git status` |
233 | 233 |
| 234 #### Increase the vnode cache size |
| 235 |
234 `git status` is used frequently to determine the status of your checkout. Due | 236 `git status` is used frequently to determine the status of your checkout. Due |
235 to the large number of files in Chromium's checkout, `git status` performance | 237 to the large number of files in Chromium's checkout, `git status` performance |
236 can be quite variable. Increasing the system's vnode cache appears to help. By | 238 can be quite variable. Increasing the system's vnode cache appears to help. By |
237 default, this command: | 239 default, this command: |
238 | 240 |
239 ```shell | 241 ```shell |
240 $ sysctl -a | egrep kern\..*vnodes | 242 $ sysctl -a | egrep kern\..*vnodes |
241 ``` | 243 ``` |
242 | 244 |
243 Outputs `kern.maxvnodes: 263168` (263168 is 257 * 1024). To increase this | 245 Outputs `kern.maxvnodes: 263168` (263168 is 257 * 1024). To increase this |
244 setting: | 246 setting: |
245 | 247 |
246 ```shell | 248 ```shell |
247 $ sudo sysctl kern.maxvnodes=$((512*1024)) | 249 $ sudo sysctl kern.maxvnodes=$((512*1024)) |
248 ``` | 250 ``` |
249 | 251 |
250 Higher values may be appropriate if you routinely move between different | 252 Higher values may be appropriate if you routinely move between different |
251 Chromium checkouts. This setting will reset on reboot, the startup setting can | 253 Chromium checkouts. This setting will reset on reboot, the startup setting can |
252 be set in `/etc/sysctl.conf`: | 254 be set in `/etc/sysctl.conf`: |
253 | 255 |
254 ```shell | 256 ```shell |
255 $ echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf | 257 $ echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf |
256 ``` | 258 ``` |
257 | 259 |
258 Or edit the file directly. | 260 Or edit the file directly. |
259 | 261 |
260 If `git --version` reports 2.6 or higher, the following may also improve | 262 #### Configure git to use an untracked cache |
261 performance of `git status`: | 263 |
| 264 If `git --version` reports 2.8 or higher, try running |
| 265 |
| 266 ```shell |
| 267 $ git update-index --test-untracked-cache |
| 268 ``` |
| 269 |
| 270 If the output ends with `OK`, then the following may also improve performance of |
| 271 `git status`: |
| 272 |
| 273 ```shell |
| 274 $ git config core.untrackedCache true |
| 275 ``` |
| 276 |
| 277 If `git --version` reports 2.6 or higher, but below 2.8, you can instead run |
262 | 278 |
263 ```shell | 279 ```shell |
264 $ git update-index --untracked-cache | 280 $ git update-index --untracked-cache |
265 ``` | 281 ``` |
266 | 282 |
267 ### Xcode license agreement | 283 ### Xcode license agreement |
268 | 284 |
269 If you're getting the error | 285 If you're getting the error |
270 | 286 |
271 > Agreeing to the Xcode/iOS license requires admin privileges, please re-run as | 287 > Agreeing to the Xcode/iOS license requires admin privileges, please re-run as |
272 > root via sudo. | 288 > root via sudo. |
273 | 289 |
274 the Xcode license hasn't been accepted yet which (contrary to the message) any | 290 the Xcode license hasn't been accepted yet which (contrary to the message) any |
275 user can do by running: | 291 user can do by running: |
276 | 292 |
277 ```shell | 293 ```shell |
278 $ xcodebuild -license | 294 $ xcodebuild -license |
279 ``` | 295 ``` |
280 | 296 |
281 Only accepting for all users of the machine requires root: | 297 Only accepting for all users of the machine requires root: |
282 | 298 |
283 ```shell | 299 ```shell |
284 $ sudo xcodebuild -license | 300 $ sudo xcodebuild -license |
285 ``` | 301 ``` |
OLD | NEW |