Compile 32-bit tdlib builds with gcc

This commit is contained in:
Andrea Cavalli 2021-03-16 10:37:59 +01:00
parent 0fa3f3a8d9
commit a02e5dbba8
3 changed files with 18 additions and 7 deletions

View File

@ -12,6 +12,8 @@ jobs:
strategy:
matrix:
include:
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/386", implementation: "tdlight" }
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/386", implementation: "tdlib" }
- {os: ubuntu-20.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlight"}
- {os: ubuntu-20.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlib"}
- {os: ubuntu-20.04, usedocker: "true", arch: "linux/arm/v6", implementation: "tdlight"}

View File

@ -3,8 +3,13 @@ set -e
if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
echo "==Linux===="
sudo apt install -y make git zlib1g-dev libssl-dev gperf cmake clang-11 \
libc++-11-dev libc++abi-11-dev ccache maven python3 python3-pip php7.4-cli
sudo apt install -y make git zlib1g-dev libssl-dev gperf cmake \
ccache maven python3 python3-pip php7.4-cli
if { [[ "$IMPLEMENTATION_NAME" = "tdlib" ]]; } && { [[ "$CPU_ARCHITECTURE_NAME" = "386" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv6" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv7" ]]; }; then
sudo apt install -y build-essential
else
sudo apt install -y clang-11 libc++-11-dev libc++abi-11-dev
fi
elif [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
echo "==OSX======"
export PYTHON=36

View File

@ -82,21 +82,25 @@ elif [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
export BUILD_TYPE=MinSizeRel
if [[ "$CPU_ARCHITECTURE_NAME" = "aarch64" ]]; then
export CMAKE_EXTRA_ARGUMENTS=""
export CXXFLAGS="-static-libgcc -static-libstdc++"
else
export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\""
export CXXFLAGS="-static-libgcc -static-libstdc++"
fi
if [[ "$CPU_ARCHITECTURE_NAME" = "386" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv6" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv7" ]]; then
export CXXFLAGS="$CXXFLAGS -latomic"
export CMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS -latomic"
export LDFLAGS="$LDFLAGS -latomic"
export CXXFLAGS="$CXXFLAGS -latomic"
fi
if { [[ "$IMPLEMENTATION_NAME" = "tdlib" ]]; } && { [[ "$CPU_ARCHITECTURE_NAME" = "386" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv6" ]] || [[ "$CPU_ARCHITECTURE_NAME" = "armv7" ]]; }; then
export CXXFLAGS="$CXXFLAGS"
else
export CXXFLAGS="-static-libgcc -static-libstdc++"
export CC="/usr/bin/clang-11"
export CXX="/usr/bin/clang++-11"
fi
export CPU_CORES=" -- -j${CPU_CORES_NUM}"
export CC="/usr/bin/clang-11"
export CXX="/usr/bin/clang++-11"
fi
# ====== Print variables