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

Side by Side Diff: docs/mac_build_instructions.md

Issue 1753543003: docs: try to give move precise commands in Xcode-Ninja Hybrid section (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 # 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
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:
147 ```
sdefresne 2016/03/02 14:12:18 nit: for proper syntax highlighting, use ```shel
tfarina 2016/03/02 17:17:22 Done.
148 $ export GYP_GENERATORS="ninja,xcode-ninja"
sdefresne 2016/03/02 14:12:18 nit: the other pages do not prefix shell commands
tfarina 2016/03/02 17:17:22 Done.
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. Exporting your GYP\_GENERATOR\_FLAGS like the
151 `xcode_ninja_main_gyp=src/build/ninja/all.ninja.gyp` to your 154 following will fix it:
152 `GYP_GENERATOR_FLAGS` will fix this. 155 ```
sdefresne 2016/03/02 14:12:18 ditto about ```shell and $
tfarina 2016/03/02 17:17:22 Done.
156 $ export GYP_GENERATOR_FLAGS="xcode_ninja_main_gyp=src/build/ninja/all.ninja.gyp "
157 ```
sdefresne 2016/03/02 14:12:18 I would add the following: To make this change pe
tfarina 2016/03/02 17:17:22 Done.
153 158
154 After generating the project files with gclient runhooks, open 159 After, generate the project files with:
155 `src/build/ninja/all.ninja.xcworkspace`. 160 ```
sdefresne 2016/03/02 14:12:18 ditto about ```shell and $
tfarina 2016/03/02 17:17:22 Done.
161 $ gclient runhooks
162 ```
163
164 And finally, open it:
165 ```
166 $ open build/ninja/all.ninja.xcworkspace
sdefresne 2016/03/02 14:12:18 ditto about ```shell and $
tfarina 2016/03/02 17:17:22 Done.
167 ```
156 168
157 You may run into a problem where http://YES is opened as a new tab every time 169 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, 170 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 171 choose the Options tab, and uncheck "Allow debugging when using document
160 Versions Browser". When this option is checked, Xcode adds 172 Versions Browser". When this option is checked, Xcode adds
161 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` gets 173 `--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` gets
162 interpreted as a URL to open. 174 interpreted as a URL to open.
163 175
164 If you want to limit the number of targets visible, which is known to improve 176 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 177 Xcode performance, add `xcode_ninja_executable_target_pattern=%target%` where
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 be set in `/etc/sysctl.conf`: 238 be set in `/etc/sysctl.conf`:
227 239
228 echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf 240 echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf
229 241
230 Or edit the file directly. 242 Or edit the file directly.
231 243
232 If your `git --version` reports 2.6 or higher, the following may also improve 244 If your `git --version` reports 2.6 or higher, the following may also improve
233 performance of `git status`: 245 performance of `git status`:
234 246
235 git update-index --untracked-cache 247 git update-index --untracked-cache
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