aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build-tot-chromium.sh
blob: 95924625294b540fd3ba2afdddb2429275edec5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#
# Author: Ravi Mistry
#
# Script to checkout and build a fresh copy of Chromium from head that uses a
# writable, tip-of-tree Skia rather than the read-only, revision-locked Skia
# specified in http://src.chromium.org/viewvc/chrome/trunk/src/DEPS
#
# Sample Usage:
#   tools/build-tot-chromium.sh ~/chromiumtrunk

if [[ $# -ne 1 ]] ; then
  echo "usage: $0 chromium_location"
  exit 1
fi
CHROMIUM_LOCATION=$1

echo -e "\n\n========Deleting $CHROMIUM_LOCATION========\n\n"
rm -rf $CHROMIUM_LOCATION

mkdir $CHROMIUM_LOCATION
cd $CHROMIUM_LOCATION
gclient config https://src.chromium.org/chrome/trunk/src
echo '
solutions = [
  { "name"        : "src",
    "url"         : "https://src.chromium.org/chrome/trunk/src",
    "deps_file"   : "DEPS",
    "managed"     : True,
    "custom_deps" : {
      "src/third_party/skia": "https://skia.googlecode.com/svn/trunk",
      "src/third_party/skia/gyp": None,
      "src/third_party/skia/src": None,
      "src/third_party/skia/include": None,
    },
    "safesync_url": "",
  },
]
' > .gclient

echo -e "\n\n========Starting gclient sync========\n\n"
START_TIME=$SECONDS
gclient sync
END_TIME=$SECONDS
echo -e "\n\n========gclient sync took $((END_TIME - START_TIME)) seconds========\n\n"

cd src
rm -rf out/Debug out/Release
GYP_GENERATORS='ninja' ./build/gyp_chromium

echo -e "\n\n========Starting ninja build========\n\n"
START_TIME=$SECONDS
ninja -C out/Release chrome
END_TIME=$SECONDS
echo -e "\n\n========ninja build took $((END_TIME - START_TIME)) seconds========\n\n"

SVN_VERSION=`svnversion .`
echo -e "\n\n========The Chromium & Skia versions are $SVN_VERSION========\n\n"