PrerequisitesChromium supports building on Windows, Mac and Linux host systems. Linux is required for building Android, and a Mac is required for building iOS. Platform-specific requirementsThis page documents common checkout and build instructions. There are platform-specific pages with additional information and requirements: Set up your environmentCheck out and install the depot_tools package. This contains the custom tools necessary to check out and build. Create a 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): mkdir chromium Check out the source codeUse the "fetch" tool that came with depot_tools: fetch chromium # [fetch --no-history chromium] Use Post-sync hooksSome platform-specific pages (linked above) may have extra instructions. In particular, on Ubuntu Linux run: ./build/install-build-deps.sh Optional: install API keys which allow your build to use certain Google services. This isn't necessary for most development and testing purposes. Run hooks to fetch everything needed for your build setup. gclient runhooks Update the checkoutTo sync to newer versions of the code (not necessary the first time), run the following in your src/ directory: git rebase-update The first command updates the primary Chromium source repository and rebases your local development branches on top of tip-of-tree. The second command updates all of the dependencies specified in the DEPS file. See also "More help managing your checkout" below. Setting up the buildGN is our meta-build system. It reads build configuration from gn gen out/Default
BuildingBuild Chromium (the "chrome" target) with Ninja using the command: ninja -C out/Default chrome List all GN targets by running RunningYou can run chrome with (substituting "Default" with your build directory):
Running testsRun the test targets listed above in the same manner. You can specify only a certain set of tests to run using out/Default/unit_tests --gtest_filter="PushClientTest.*" You can find out more about GoogleTest on the GoogleTest wiki page Quick start to submit a patchSee contributing code for a more in-depth guide. git checkout -b my_patch The
More help managing your checkout
Getting help
|
For Developers > How-Tos >