Skip to content

Commit

Permalink
chromium-66.0.3331.2: Rebuild
Browse files Browse the repository at this point in the history
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
donald committed Jan 30, 2018
1 parent 174b0ef commit 4663c0e
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions chromium-66.0.3331.2-1.build.sh
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

0 comments on commit 4663c0e

Please sign in to comment.