Use sccache
This commit is contained in:
parent
80011b08e6
commit
0470146be9
@ -13,6 +13,15 @@ HOST_CMAKE_C_FLAGS="-fuse-ld=lld"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
||||
|
||||
# ccache
|
||||
CCACHE=$(which sccache)
|
||||
if [[ -x "$CCACHE" ]]; then
|
||||
echo "found sccache: $CCACHE"
|
||||
else
|
||||
echo "sccache not found"
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
@ -23,8 +32,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
|
||||
-DTD_ENABLE_LTO=OFF \
|
||||
@ -57,8 +66,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
-DTD_ENABLE_JNI=ON \
|
||||
@ -77,8 +86,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate)" \
|
||||
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
|
@ -13,6 +13,15 @@ HOST_CMAKE_C_FLAGS="-fuse-ld=lld"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
||||
|
||||
# ccache
|
||||
CCACHE=$(which sccache)
|
||||
if [[ -x "$CCACHE" ]]; then
|
||||
echo "found sccache: $CCACHE"
|
||||
else
|
||||
echo "sccache not found"
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
@ -23,8 +32,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
|
||||
-DTD_ENABLE_LTO=OFF \
|
||||
@ -57,8 +66,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
-DTD_ENABLE_JNI=ON \
|
||||
@ -77,8 +86,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate)" \
|
||||
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
|
@ -14,6 +14,15 @@ HOST_CMAKE_C_FLAGS="-fuse-ld=lld"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
||||
|
||||
# ccache
|
||||
CCACHE=$(which sccache)
|
||||
if [[ -x "$CCACHE" ]]; then
|
||||
echo "found sccache: $CCACHE"
|
||||
else
|
||||
echo "sccache not found"
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
@ -24,8 +33,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
|
||||
-DTD_ENABLE_LTO=OFF \
|
||||
@ -52,8 +61,8 @@ INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
-DTD_ENABLE_JNI=ON \
|
||||
@ -68,8 +77,8 @@ cd natives/build
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate)" \
|
||||
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
|
@ -14,6 +14,15 @@ HOST_CMAKE_C_FLAGS="-fuse-ld=lld"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
||||
|
||||
# ccache
|
||||
CCACHE=$(which sccache)
|
||||
if [[ -x "$CCACHE" ]]; then
|
||||
echo "found sccache: $CCACHE"
|
||||
else
|
||||
echo "sccache not found"
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
@ -24,8 +33,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
|
||||
-DTD_ENABLE_LTO=OFF \
|
||||
@ -52,8 +61,8 @@ INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
-DTD_ENABLE_JNI=ON \
|
||||
@ -68,8 +77,8 @@ cd natives/build
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate)" \
|
||||
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
|
@ -14,6 +14,15 @@ HOST_CMAKE_C_FLAGS="-fuse-ld=lld"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
||||
|
||||
# ccache
|
||||
CCACHE=$(which sccache)
|
||||
if [[ -x "$CCACHE" ]]; then
|
||||
echo "found sccache: $CCACHE"
|
||||
else
|
||||
echo "sccache not found"
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
@ -24,8 +33,8 @@ CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPI
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} ${HOST_CMAKE_EXE_LINKER_FLAGS}" \
|
||||
\
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="" \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
|
||||
-DTD_ENABLE_LTO=OFF \
|
||||
@ -52,8 +61,8 @@ INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
-DTD_ENABLE_JNI=ON \
|
||||
@ -68,8 +77,8 @@ cd natives/build
|
||||
cmake \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="$CCACHE" \
|
||||
-DTD_GENERATED_BINARIES_DIR="$(readlink -e ../../implementations/tdlight/td_tools_build/td/generate)" \
|
||||
-DTD_SRC_DIR="$(readlink -e ../../implementations/tdlight)" \
|
||||
-DTD_ENABLE_LTO=ON \
|
||||
|
@ -13,27 +13,20 @@ echo "deb [arch=arm64,armhf,ppc64el,riscv64,s390x] http://ports.ubuntu.com/ $(ls
|
||||
apt-get --assume-yes update
|
||||
|
||||
# Install and bypass a bug in the cross-platform libc++ packages
|
||||
apt-get --assume-yes autoremove libc++-14-dev libc++abi-14-dev libc++1-14 libc++abi1-14 || true
|
||||
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev:arm64 libc++abi-14-dev:arm64
|
||||
apt-get --assume-yes autoremove libc++-14-dev libc++abi-14-dev libc++1-14 libc++abi1-14 libunwind-14-dev || true
|
||||
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev:arm64 libc++abi-14-dev:arm64 libunwind-14-dev:arm64
|
||||
rm -r \
|
||||
/usr/lib/aarch64-linux-gnu/libc++.a \
|
||||
/usr/lib/aarch64-linux-gnu/libc++abi.so \
|
||||
/usr/lib/aarch64-linux-gnu/libc++abi.so.1.0 \
|
||||
/usr/lib/aarch64-linux-gnu/libclang-cpp.so.14 \
|
||||
/usr/lib/aarch64-linux-gnu/libc++.so \
|
||||
/usr/lib/aarch64-linux-gnu/libc++.so.1.0 \
|
||||
/usr/lib/aarch64-linux-gnu/libunwind.a \
|
||||
/usr/lib/aarch64-linux-gnu/libunwind.so
|
||||
/usr/lib/aarch64-linux-gnu/libunwind.so.1.0
|
||||
mv -t /usr/lib/aarch64-linux-gnu/ \
|
||||
/usr/lib/llvm-14/lib/libc++.a \
|
||||
/usr/lib/llvm-14/lib/libc++abi.so \
|
||||
/usr/lib/llvm-14/lib/libc++abi.so.1.0 \
|
||||
/usr/lib/llvm-14/lib/libclang-cpp.so.14 \
|
||||
/usr/lib/llvm-14/lib/libc++.so \
|
||||
/usr/lib/llvm-14/lib/libc++.so.1.0 \
|
||||
/usr/lib/llvm-14/lib/libunwind.a \
|
||||
/usr/lib/llvm-14/lib/libunwind.so
|
||||
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev libc++abi-14-dev
|
||||
/usr/lib/llvm-14/lib/libunwind.so.1.0
|
||||
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev libc++abi-14-dev libunwind-14-dev
|
||||
# End libc++ packages bugfix
|
||||
|
||||
# Add arm64 common files
|
||||
@ -42,4 +35,4 @@ dpkg-deb -xv libclang-common-14-dev_*_arm64.deb /
|
||||
|
||||
|
||||
# Install dependencies
|
||||
apt-get --assume-yes install libssl-dev:arm64 zlib1g-dev:arm64 openjdk-8-jdk-headless:arm64 libgcc-12-dev:arm64 libc6-dev:arm64 libunwind-14-dev:arm64
|
||||
apt-get --assume-yes install libssl-dev:arm64 zlib1g-dev:arm64 openjdk-8-jdk-headless:arm64 libgcc-12-dev:arm64 libc6-dev:arm64
|
||||
|
Loading…
Reference in New Issue
Block a user