Skip to content

Commit a6ea864

Browse files
authored
enable CCACHE
1 parent 90a10e4 commit a6ea864

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ fi
1818
# Fixes building some components. See https://github.com/espressif/arduino-esp32/issues/10167
1919
export IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS=1
2020

21+
CCACHE_ENABLE=1
22+
2123
export TARGET="all"
2224
BUILD_TYPE="all"
2325
SKIP_ENV=0
@@ -26,8 +28,9 @@ ARCHIVE_OUT=1
2628
DEPLOY_OUT=0
2729

2830
function print_help() {
29-
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
31+
echo "Usage: build.sh [-s] [-n] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
3032
echo " -s Skip installing/updating of ESP-IDF and all components"
33+
echo " -n Disable ccache"
3134
echo " -A Set which branch of arduino-esp32 to be used for compilation"
3235
echo " -I Set which branch of ESP-IDF to be used for compilation"
3336
echo " -i Set which commit of ESP-IDF to be used for compilation"
@@ -43,6 +46,9 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
4346
s )
4447
SKIP_ENV=1
4548
;;
49+
n )
50+
CCACHE_ENABLE=0
51+
;;
4652
e )
4753
ARCHIVE_OUT=1
4854
;;
@@ -83,6 +89,8 @@ done
8389
shift $((OPTIND -1))
8490
CONFIGS=$@
8591

92+
export IDF_CCACHE_ENABLE=$CCACHE_ENABLE
93+
8694
# Output the TARGET array
8795
echo "TARGET(s): ${TARGET[@]}"
8896

0 commit comments

Comments
 (0)