-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it a release version (is_debug=false) which has a much reduced number of shared librarise and a several times faster startup. Improve the script a bit to better support to rerun it in case of download failures.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /bin/bash | ||
|
||
# https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md | ||
|
||
PKG=chromium | ||
VERSION=66.0.3331.2 | ||
BUILD=1 | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
#PREFIX=/dev/shm/$PKG-$VERSION-$BUILD | ||
#PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD | ||
|
||
set -xe | ||
umask 022 | ||
|
||
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp | ||
##test -d $BUILD_TMPDIR && (find $BUILD_TMPDIR -type d -not -perm -u=w -exec chmod u=rwx {} \; && rm -rf $BUILD_TMPDIR) | ||
mkdir -p $BUILD_TMPDIR/home | ||
export TMPDIR=$BUILD_TMPDIR | ||
export HOME=$BUILD_TMPDIR/home | ||
|
||
exec </dev/null | ||
|
||
mkdir -p $PREFIX | ||
cat >$PREFIX/profile <<-EOF | ||
PATH=$PREFIX/bin:\$PATH | ||
EOF | ||
. $PREFIX/profile | ||
|
||
export MAKEFLAGS="-j $(nproc)" | ||
|
||
BUILDDIR=$PREFIX/build | ||
|
||
mkdir -p $BUILDDIR | ||
cd $BUILDDIR | ||
|
||
test -d depot_tools || git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
|
||
PATH=$PATH:$PREFIX/build/depot_tools | ||
|
||
test -d chromium || mkdir chromium | ||
cd chromium | ||
if [ ! -d src ]; then | ||
fetch --nohooks chromium | ||
else | ||
gclient --nohooks sync | ||
fi | ||
cd src | ||
git checkout -f $VERSION | ||
patch -p1 < /src/mariux/patches/chrome-66-Disable-warning-for-missing-API-keys.patch | ||
gclient runhooks | ||
|
||
test -d $PREFIX/bin || mkdir $PREFIX/bin | ||
test -d out || mkdir out | ||
|
||
gn gen out/Default --args="is_debug = false" | ||
ninja -C out/Default chrome | ||
|
||
cp -a out/Default/* $PREFIX/bin/ | ||
strip $PREFIX/bin/chrome | ||
strip $PREFIX/bin/*.so | ||
rm $PREFIX/bin/*.TOC | ||
|
||
exit |