Skip to content

Instantly share code, notes, and snippets.

@pbakaus
Created February 4, 2015 15:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbakaus/73bead28ebcf43740eaa to your computer and use it in GitHub Desktop.
Save pbakaus/73bead28ebcf43740eaa to your computer and use it in GitHub Desktop.
Chromium build helpers for your DevTools workflow.
export PATH=/Users/pbakaus/Sites/depot_tools:$PATH
export PATH=/Users/pbakaus/goma:$PATH
export CHROMIUM_DIR=~/Sites/src
export BLINK_DIR=~/Sites/src/third_party/WebKit
fresh() {
cd "$CHROMIUM_DIR" && git rebase-update
cd "$BLINK_DIR" && git rebase-update
gclient sync --jobs=16
}
build() {
cd "$CHROMIUM_DIR" && ../cr_gyp.sh
../cr_ninja.sh
}
alias chrome='/Users/pbakaus/Sites/src/out/Release/Chromium.app/Contents/MacOS/Chromium'
export PATH=$HOME/goma:$PWD/third_party/llvm-build/Release+Asserts/bin:$PATH
export CC=clang
export CXX=clang++
export GYP_DEFINES="mac_sdk=10.9 disable_nacl=1 use_goma=1 fastbuild=1 debug_devtools=1"
$HOME/Sites/src/build/gyp_chromium -Gconfig=Release
export PATH=$HOME/goma:$PWD/third_party/llvm-build/Release+Asserts/bin:$PATH
export CC=clang
export CXX=clang++
$HOME/goma/goma_ctl.py ensure_start
ninja -C $HOME/Sites/src/out/Release -j150 chrome
@pbakaus
Copy link
Author

pbakaus commented Feb 4, 2015

These scripts add the following aliases to dramatically simplify your Chromium build process:

  • "fresh": updates both Blink and Chromium to the latest and hottest (via rebase-update)
  • "build": builds Chromium via Ninja and GOMA
  • "chrome": opens the Chromium build

All commands work everywhere in your system. The following is assumed and needs to be replaced for your needs:

  • replace "/Users/pbakaus/Sites/depot_tools" with your depot_tools path
  • replace "/Users/pbakaus/goma" with your goma path
  • replace "~/Sites/src" with the directory of your Chromium git checkout
  • put the cr_gyp.sh and cr_ninja.sh files into the parent directory of where your Chromium checkout sits (i.e. in my case, the Sites folder)
  • ???
  • PROFIT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment