diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-09-21 06:28:35 -0400 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-09-21 15:39:17 +0300 |
commit | 5a2f41fff079040852f3ba8fe7bedeb17b50e734 (patch) | |
tree | 1609f5429bb16a2db9bd193a0b419ce163d6c9e3 /Toolchain | |
parent | aa7c59013034fe1890135992abca12a349f8c3a3 (diff) | |
download | serenity-5a2f41fff079040852f3ba8fe7bedeb17b50e734.zip |
Toolchain: Add --ci option to BuildClang to enable ccache
Diffstat (limited to 'Toolchain')
-rwxr-xr-x | Toolchain/BuildClang.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Toolchain/BuildClang.sh b/Toolchain/BuildClang.sh index dbafecbb58..d4ce0a6f68 100755 --- a/Toolchain/BuildClang.sh +++ b/Toolchain/BuildClang.sh @@ -47,14 +47,23 @@ fi BUILD=$($REALPATH "$BUILD") dev= +ci= + while [ "$1" != "" ]; do case $1 in --dev ) dev=1 ;; + --ci ) ci=1 + ;; esac shift done +if [ "$dev" = "1" ] && [ "$ci" = "1" ]; then + echo "Please only set one of --dev or --ci." + exit 1 +fi + echo PREFIX is "$PREFIX" echo SYSROOT is "$SYSROOT" @@ -272,7 +281,11 @@ pushd "$DIR/Build/clang/$ARCH" -DLLVM_INCLUDE_TESTS=OFF \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=OFF \ - ${dev:+"-DLLVM_CCACHE_BUILD=ON"} || exit 1 + ${dev:+"-DLLVM_CCACHE_BUILD=ON"} \ + ${ci:+"-DLLVM_CCACHE_BUILD=ON"} \ + ${ci:+"-DLLVM_CCACHE_DIR=$LLVM_CCACHE_DIR"} \ + ${ci:+"-DLLVM_CCACHE_MAXSIZE=$LLVM_CCACHE_MAXSIZE"} \ + || exit 1 buildstep_ninja "llvm+clang/build" ninja -j "$MAKEJOBS" || exit 1 buildstep "llvm+clang/install" ninja install || exit 1 |