Building Cronet (on iOS)

Get source and dependencies


    ~ $ mkdir chromium && cd chromium
    ~/chromium $ fetch --nohooks ios
  • Enter the ./src directory:
    ~/chromium $ cd src


  • Download the depenedencies
    ~/chromium/src $ gclient sync

Build it!

  • We'll be using it a bunch, so you may want to put in your path. Of course, you can just use its full name every time if you want...
    ~/chromium/src $ ln -s /path/to/components/cronet/tools/ /somewhere/in/your/path
or however else you want to do this

This sets up the build directory...

    ~/chromium/src $ gn

...and this builds it!

    ~/chromium/src $ build -d out/Debug-iphonesimulator
  • You can also use build-test to run tests on the simulator
    ~/chromium/src $ build-test -d out/Debug-iphonesimulator
  • If you want to deploy to hardware, you will have to set up XCode for deploying to hardware, and then use gn with the -i flag (for iphoneos build), and build with either the -i flag, or using the out/Debug-iphoneos directory.
    ~/chromium/src $ gn -i

and then

    ~/chromium/src $ build -i


    ~/chromium/src $ build -d out/Debug-iphoneos


  • Acquire the most recent version of the source with:
    ~/chromium/src $ sync

and then rebuild:

    ~/chromium/src $ build -d out/Debug-iphoneos
    ~/chromium/src $ build -d out/Debug-iphonesimulator

For more information, you can run

    ~ $ -h