ccache dir moved outside source directory in gbs builds.
authorTomasz Olszak <t.olszak@samsung.com>
Wed, 3 Sep 2014 11:52:47 +0000 (13:52 +0200)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Previously ccache directory for gbs was placed in
chromium-efl directory. It was reusable because by default all builds
were made with --incremental flag so chromium-efl repo dir
was mounted into gbs build root. Without -incremental flag
it is not possible anymore. However we can use /.ccache directory inside
gbs sysroot for that. It is not removed even when different package is
built or -C flag is passed.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=5263

Change-Id: Iab7481f38916f19877eeed0dde96fd11e45fb365
Signed-off-by: Tomasz Olszak <t.olszak@samsung.com>
tizen_src/build/ccache_env.sh

index 092a13a..afad5d5 100644 (file)
@@ -13,8 +13,16 @@ if [ "$1" == "desktop" -o  "$1" == "mobile" -o "$1" == "tv" ]; then
   OUTPUT_BASE_FOLDER=out.${1}.$(getHostArch)
   export CCACHE_CPP2=yes
   export CCACHE_SLOPPINESS=time_macros
-  export CCACHE_BASEDIR=${TOPDIR}/src
-  export CCACHE_DIR=${TOPDIR}/${OUTPUT_BASE_FOLDER}.ccache
+  export CCACHE_BASEDIR=${TOPDIR}
+
+  if [ "$USER" == "abuild" ]; then
+    #/.ccache directory in gbs sysroot is not removed by -C option
+    #unlike /var/tmp and /tmp directories
+    #so having /.ccache as out ccache dir will make possible to use
+    #ccache also with bot incremental and non-incremental builds
+    export CCACHE_DIR=/.ccache/${OUTPUT_BASE_FOLDER}
+  fi
+
   export CCACHE_COMPILERCHECK=content
   CCACHESIZE=$(ccache -s | grep max | grep -oE "[0-9]+" | head -1)
   if [ $CCACHESIZE == "1" ]; then