Due mostly to its history and its complexity, Chromium uses a nonstandard set of custom tools to check out and build. Here's an overview of the steps you'll run:
Linux users often prefer to use Git. We have apage on how to check out the main tree with Git, but note that you still will need to understand and run all ofgclientandgypanyway.
.../chromium/src $ ./build/install-build-deps.sh
Aftergclient syncfinishes, it will rungypautomatically to generate the Makefiles. You can re-run gyp yourself asbuild/gyp_chromium.
gypsupports a minimal amount of build configuration via the-Dflag.
./build/gyp_chromium -Dflag1=value1 -Dflag2=value2
The weird "src/" directory is an artifact of gclient. Start with:
$ cd src
$ make chrome
To do a parallel build, add-jXwhere X is the number of make processes to start up. This is useful for multiple-core machines or machines using distcc.
$ make
The above builds all libraries and tests in all components.It will take hours.
Specifying other target names to restrict the build to just what you're interested in. To build just the simplest unit test:
$ make base_unittests
Or you can specify the explicit file you want to build:
$ make out/Debug/chrome
GCC 4.6 is not supported yet.You may run into some build errors (and patches are welcome to fix them). Please seehttp://crbug.com/80071before you proceed.
Information about building with Clang can be foundhere.
Executables are written insrc/out/Debug/for Debug builds, andsrc/out/Release/for Release builds.
AddBUILDTYPE=Releaseto the make invocation:
$ make BUILDTYPE=Release
If you want to see the actual commands that make is invoking, addV=1to the make invocation.
$ make V=1
This is useful if, for example, you are debugging gyp changes, or otherwise need to see what make is actually doing.
All built files are put into theout/directory, so to start over with a clean build, just:
rm -rf out
If you seemake: *** No targets specified and no makefile found. Stop., you probably need to rungypagain. See the "Configuring" steps above.
If, during the final link stage:
LINK(target) out/Debug/chrome
You get an error like:
collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc' collect2: ld terminated with signal 11 [Segmentation fault], core dumped
you are probably running out of memory when linking. Try one of:
If you want to contribute to the effort toward a Chromium-based browser for Linux, please check out theLinux Development pagefor more information.