ChromeDriver
|
depot_tools
depot_tools
repository:depot_tools
to the end of your PATH (you will probably want to put this in your ~/.bash_profile
or ~/.zshrc
). Assuming you cloned depot_tools
to /path/to/depot_tools
(note: you must use the absolute path or Python will not be able to find infra tools):chromium
directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces):fetch
tool from depot_tools
to check out the code and its dependencies.fetch --no-history chromium
. You can call git fetch --unshallow
to retrieve the full history later.fetch
completes, it will have created a hidden .gclient
file and a directory called src
in the working directory. The remaining instructions assume you have switched to the src
directory:.ninja
files. You can create any number of build directories with different configurations. To create a build directory:Default
with another name, but it should be a subdirectory of out
.gn help
on the command line or read the quick start guide.args.gn
to do a release build.args.gn
to build many small dylibs instead of a single large executable. This makes incremental builds much faster, at the cost of producing a binary that opens less quickly. Component builds work in both debug and release.autoninja
is a wrapper that automatically provides optimal values for the arguments passed to ninja
.)gn ls out/Default
from the command line. To compile one, pass the GN label to Ninja with no preceding “//” (so, for //chrome/test:unit_tests
use autoninja -C out/Default chrome/test:unit_tests
).--gtest_filter
arg, e.g.:lldb
at the command line, that is possible without building in Xcode (see Debugging in Xcode).lldb
prompt (both in Xcode or in terminal):uptr
is a std::unique_ptr
, the address it wraps is accessible as uptr.__ptr_.__value_
.base::string16
, ensure you have a ~/.lldbinit
file and add the following line into it (substitute {SRC} for your actual path to the root of Chromium's sources):origin/master
). If you don't want to use this script, you can also just use git pull
or other common Git commands to update the repo.autoninja -C out/gn chrome
) or by choosing the chrome
target in the hybrid project and choosing Build.--ide=xcode
to gn gen
:--NSDocumentRevisionsDebugMode YES
to the launch arguments, and the YES
gets interpreted as a URL to open.#chromium
on irc.freenode.net
and ask there. Be sure that the waterfall is green and the tree is open before checking out. This will increase your chances of success.git status
git status
is used frequently to determine the status of your checkout. Due to the large number of files in Chromium‘s checkout, git status
performance can be quite variable. Increasing the system’s vnode cache appears to help. By default, this command:kern.maxvnodes: 263168
(263168 is 257 * 1024). To increase this setting:/etc/sysctl.conf
:git --version
reports 2.8 or higher, try runningOK
, then the following may also improve performance of git status
:git --version
reports 2.6 or higher, but below 2.8, you can instead run