#!/bin/bash # Copyright © Hisilicon Technologies Co., Ltd. 2020-2021. All rights reserved. function set_env() { if [ ! -d $(gettop)/ccache/ ];then mkdir -p $(gettop)/ccache/ fi export USE_CCACHE=1 export CCACHE_EXEC=$(gettop)/vendor/huanglong/build/tools/ccache export CCACHE_DIR=$(gettop)/ccache export PATH=$(gettop)/vendor/huanglong/build/tools:$PATH ccache -M 100G # set default build path env export PATH=/usr/local/bin:/usr/bin:/bin:$PATH # add the path of LLVMgold.so to LD_LIBRARY_PATH, for LTO_CLANG CLANG_PATH=$(gettop)/prebuilts/clang/host/linux-x86/clang-r346389c export LD_LIBRARY_PATH=$CLANG_PATH/lib64:$LD_LIBRARY_PATH } set_env