Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17c0bff5 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Browser: Support ccache for browser

parent 911e34fe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
src/
apks/
_gclient_src*/
.ccache/
.cipd/
.gclient*
depot_tools/
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ RUN add-apt-repository -y ppa:deadsnakes/ppa

RUN apt-get -qq update && \
    apt-get install -qqy --no-install-recommends \
    python3.8 lib32z1 lighttpd xvfb libncurses5:i386 libstdc++6:i386 zlib1g:i386
    python3.8 lib32z1 lighttpd xvfb libncurses5:i386 libstdc++6:i386 zlib1g:i386 ccache

RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
+14 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ build() {
    build_args+=' android_default_version_name="'$chromium_version'"'
    build_args+=' android_default_version_code="'$code'"'

    build_args+=' cc_wrapper="ccache"'

    gn gen "out/$1" --args="$build_args"
    ninja -C out/$1 trichrome_webview_32_apk trichrome_chrome_32_apk trichrome_library_32_apk \
            trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk
@@ -67,6 +69,17 @@ build() {
    done
}

setup_ccache() {
    echo ">> [$(date)] Settings up ccache"
    export USE_CCACHE=1
    export CCACHE_EXEC=$(command -v ccache)
    export PATH=$chromium_dir/src/third_party/llvm-build/Release+Asserts/bin:$PATH
    export CCACHE_CPP2=yes
    export CCACHE_SLOPPINESS=time_macros
    export CCACHE_DIR=$chromium_dir/.ccache
    ccache -M 200G
}

patch() {
    cd $chromium_dir/src
    echo ">> [$(date)] Apply Bromite and /e/ patches"
@@ -151,6 +164,7 @@ fi

cd $chromium_dir/src
. build/android/envsetup.sh
setup_ccache

if [ ! -z "$arch" ]; then
    build $arch