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

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

Update ccache config for latest

parent f7f05e54
Loading
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -94,17 +94,6 @@ build() {
  fi
}

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)] Applying cromite patches"
@@ -270,6 +259,8 @@ else
fi
export PATH="$chromium_dir/depot_tools:$PATH"

source ${root_dir}/init-ccache.sh

chromium_commit_hash=$(git ls-remote --refs $chromium_url refs/tags/$chromium_version | awk '{print $1}')

if [ $clean -eq 1 ]; then
@@ -311,7 +302,6 @@ fi

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

if [ ! -z "$arch" ]; then
  build $arch
@@ -321,3 +311,5 @@ else
  build x86
  build x64
fi

ccache -s
+3 −12
Original line number Diff line number Diff line
@@ -20,20 +20,11 @@ build() {
  fi
}

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
}

export PATH="$chromium_dir/depot_tools:$PATH"

source ${root_dir}/init-ccache.sh

cd $chromium_dir/src
. build/android/envsetup.sh
setup_ccache
build
ccache -s

init-ccache.sh

0 → 100755
+27 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash

chromium_dir="${CHROMIUM_DIR}"
root_dir=$(dirname "$(readlink -f "$0")")
if [ ! -d "$chromium_dir" ]; then
  chromium_dir=$root_dir
fi

echo ">> [$(date)] Setting up ccache config"
export PATH=$chromium_dir/src/third_party/llvm-build/Release+Asserts/bin:$PATH
export CCACHE_DIR=$chromium_dir/.ccache
export USE_CCACHE=1

echo ">> [$(date)] Applying ccache configuration"
ccache --set-config=max_size=200G \
  --set-config=compression_level=6 \
  --set-config=sloppiness=time_macros

echo ">> [$(date)] Cleaning unused cache files and statistics"
ccache --evict-older-than 30d
ccache -c
ccache -z

echo ">> [$(date)] Recompressing existing cache entries"
ccache --recompress 6

export PATH="/usr/lib/ccache:$PATH"