Fix host compiler
This commit is contained in:
parent
9f19713141
commit
32e7232a00
@ -7,15 +7,15 @@ rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/
|
||||
mkdir -p implementations/tdlight/build implementations/tdlight/build/td_bin/bin implementations/tdlight/td_tools_build/java/it/tdlight/jni api/src/main/java-legacy/it/tdlight/jni api/src/main/java-sealed/it/tdlight/jni natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
|
||||
|
||||
# machine-specific flags
|
||||
HOST_CMAKE_C_COMPILER="/usr/bin/clang-12"
|
||||
HOST_CMAKE_CXX_COMPILER="/usr/bin/clang++-12"
|
||||
HOST_CMAKE_C_COMPILER="/usr/bin/clang-10"
|
||||
HOST_CMAKE_CXX_COMPILER="/usr/bin/clang++-10"
|
||||
HOST_CMAKE_C_FLAGS="-fuse-ld=lld -Wno-psabi --specs=nosys.specs -fdata-sections -ffunction-sections -Wl,--gc-sections"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++ -fno-exceptions"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++ -lc++abi"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
@ -47,7 +47,7 @@ export CMAKE_CXX_FLAGS_MINSIZEREL="${CMAKE_CXX_FLAGS_MINSIZEREL} -flto=thin -Oz"
|
||||
cd implementations/tdlight/build
|
||||
INSTALL_PREFIX="$(readlink -e ./td_bin/)"
|
||||
INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
@ -65,7 +65,7 @@ cmake --build . --target install --config Release "-j$(nproc)"
|
||||
cd ../../../
|
||||
|
||||
cd natives/build
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
|
@ -15,7 +15,7 @@ HOST_CMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++ -lc++abi"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
@ -47,7 +47,7 @@ export CMAKE_CXX_FLAGS_MINSIZEREL="${CMAKE_CXX_FLAGS_MINSIZEREL} -flto=thin -Oz"
|
||||
cd implementations/tdlight/build
|
||||
INSTALL_PREFIX="$(readlink -e ./td_bin/)"
|
||||
INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
@ -65,7 +65,7 @@ cmake --build . --target install --config Release "-j$(nproc)"
|
||||
cd ../../../
|
||||
|
||||
cd natives/build
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
|
@ -8,15 +8,15 @@ rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/
|
||||
mkdir -p implementations/tdlight/build implementations/tdlight/build/td_bin/bin implementations/tdlight/td_tools_build/java/it/tdlight/jni api/src/main/java-legacy/it/tdlight/jni api/src/main/java-sealed/it/tdlight/jni natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
|
||||
|
||||
# machine-specific flags
|
||||
HOST_CMAKE_C_COMPILER="/usr/bin/clang-12"
|
||||
HOST_CMAKE_CXX_COMPILER="/usr/bin/clang++-12"
|
||||
HOST_CMAKE_C_COMPILER="/usr/bin/clang-10"
|
||||
HOST_CMAKE_CXX_COMPILER="/usr/bin/clang++-10"
|
||||
HOST_CMAKE_C_FLAGS="-fuse-ld=lld -Wno-psabi --specs=nosys.specs -fdata-sections -ffunction-sections -Wl,--gc-sections"
|
||||
HOST_CMAKE_CXX_FLAGS="${HOST_CMAKE_C_FLAGS} -stdlib=libc++ -fno-exceptions"
|
||||
HOST_CMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++ -lc++abi"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
CXXFLAGS="-stdlib=libc++" cmake \
|
||||
CXXFLAGS="-stdlib=libc++" CC="$HOST_CMAKE_C_COMPILER" CXX="$HOST_CMAKE_CXX_COMPILER" cmake \
|
||||
-DCMAKE_C_COMPILER="${HOST_CMAKE_C_COMPILER}" \
|
||||
-DCMAKE_CXX_COMPILER="${HOST_CMAKE_CXX_COMPILER}" \
|
||||
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${HOST_CMAKE_C_FLAGS}" \
|
||||
|
8
.github/workflows/tdapi_file.yaml
vendored
8
.github/workflows/tdapi_file.yaml
vendored
@ -77,9 +77,9 @@ jobs:
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
echo "Deploying legacy package"
|
||||
mvn -f api/pom.xml deploy -Dlegacy=true
|
||||
mvn -f api/pom.xml package deploy -Dlegacy=true -Drevision="-1.0.0.0-SNAPSHOT"
|
||||
echo "Building standard package"
|
||||
mvn -f api/pom.xml deploy
|
||||
mvn -f api/pom.xml package deploy -Drevision="-1.0.0.0-SNAPSHOT"
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
||||
@ -90,10 +90,10 @@ jobs:
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
echo "Deploying legacy package"
|
||||
mvn -f api/pom.xml deploy -Dlegacy=true -Drevision="$REVISION"
|
||||
mvn -f api/pom.xml package deploy -Dlegacy=true -Drevision="$REVISION"
|
||||
|
||||
echo "Deploying standard package"
|
||||
mvn -f api/pom.xml deploy -Drevision="$REVISION"
|
||||
mvn -f api/pom.xml package deploy -Drevision="$REVISION"
|
||||
|
||||
|
||||
echo "Deploying docs"
|
||||
|
Loading…
x
Reference in New Issue
Block a user