Not a toolchain

This commit is contained in:
Andrea Cavalli 2023-05-07 16:56:25 +02:00
parent e2851d4f82
commit 1ee5e2d163
5 changed files with 10 additions and 11 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
# Ubuntu 20.04 # Ubuntu 20.04
REVISION="${REVISION:-1.0.0.0-SNAPSHOT}" REVISION="${REVISION:-1.0.0.0-SNAPSHOT}"
TOOLCHAIN_HOST_FILE="$(readlink -e ./.github/workflows/toolchains/toolchain-cmake-host-ubuntu2004.cmake)" HOST_CMAKE_INCLUDES_FILE="$(readlink -e ./.github/workflows/toolchains/cmake-includes-ubuntu2004.cmake)"
# Create missing dirs # Create missing dirs
rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/target-legacy api/target api/.ci-friendly-pom.xml implementations/tdlight/td/generate/auto natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/target-legacy api/target api/.ci-friendly-pom.xml implementations/tdlight/td/generate/auto natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
@ -19,7 +19,7 @@ cmake \
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
-DTD_ENABLE_LTO=OFF \ -DTD_ENABLE_LTO=OFF \
-DTD_ENABLE_JNI=ON \ -DTD_ENABLE_JNI=ON \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
.. ..
cmake --build . --target prepare_cross_compiling "-j$(nproc)" cmake --build . --target prepare_cross_compiling "-j$(nproc)"
cmake --build . --target td_generate_java_api "-j$(nproc)" cmake --build . --target td_generate_java_api "-j$(nproc)"
@ -46,7 +46,7 @@ cmake \
-DTD_ENABLE_JNI=ON \ -DTD_ENABLE_JNI=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \ -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \ -DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
.. ..
cmake --build . --target install --config Release "-j$(nproc)" cmake --build . --target install --config Release "-j$(nproc)"
cd ../../../ cd ../../../
@ -63,7 +63,7 @@ cmake \
-DJAVA_SRC_DIR="../src/main/java" \ -DJAVA_SRC_DIR="../src/main/java" \
-DJava_JAVADOC_EXECUTABLE="/bin/true" \ -DJava_JAVADOC_EXECUTABLE="/bin/true" \
-DTDNATIVES_CPP_SRC_DIR="../src/main/cpp" \ -DTDNATIVES_CPP_SRC_DIR="../src/main/cpp" \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
../src/main/cpp ../src/main/cpp
cmake --build . --target install --config Release "-j$(nproc)" cmake --build . --target install --config Release "-j$(nproc)"
cd .. cd ..

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
# Ubuntu 22.04 # Ubuntu 22.04
REVISION="${REVISION:-1.0.0.0-SNAPSHOT}" REVISION="${REVISION:-1.0.0.0-SNAPSHOT}"
TOOLCHAIN_HOST_FILE="$(readlink -e ./.github/workflows/toolchains/toolchain-cmake-host-ubuntu2204.cmake)" HOST_CMAKE_INCLUDES_FILE="$(readlink -e ./.github/workflows/toolchains/cmake-includes-ubuntu2204.cmake)"
# Create missing dirs # Create missing dirs
rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/target-legacy api/target api/.ci-friendly-pom.xml implementations/tdlight/td/generate/auto natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/target-legacy api/target api/.ci-friendly-pom.xml implementations/tdlight/td/generate/auto natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
@ -19,7 +19,7 @@ cmake \
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
-DTD_ENABLE_LTO=OFF \ -DTD_ENABLE_LTO=OFF \
-DTD_ENABLE_JNI=ON \ -DTD_ENABLE_JNI=ON \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
.. ..
cmake --build . --target prepare_cross_compiling "-j$(nproc)" cmake --build . --target prepare_cross_compiling "-j$(nproc)"
cmake --build . --target td_generate_java_api "-j$(nproc)" cmake --build . --target td_generate_java_api "-j$(nproc)"
@ -46,7 +46,7 @@ cmake \
-DTD_ENABLE_JNI=ON \ -DTD_ENABLE_JNI=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \ -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \ -DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
.. ..
cmake --build . --target install --config Release "-j$(nproc)" cmake --build . --target install --config Release "-j$(nproc)"
cd ../../../ cd ../../../
@ -63,7 +63,7 @@ cmake \
-DJAVA_SRC_DIR="../src/main/java" \ -DJAVA_SRC_DIR="../src/main/java" \
-DJava_JAVADOC_EXECUTABLE="/bin/true" \ -DJava_JAVADOC_EXECUTABLE="/bin/true" \
-DTDNATIVES_CPP_SRC_DIR="../src/main/cpp" \ -DTDNATIVES_CPP_SRC_DIR="../src/main/cpp" \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
../src/main/cpp ../src/main/cpp
cmake --build . --target install --config Release "-j$(nproc)" cmake --build . --target install --config Release "-j$(nproc)"
cd .. cd ..

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
# Ubuntu 20.04 # Ubuntu 20.04
REVISION="${REVISION:-1.0.0.0-SNAPSHOT}" REVISION="${REVISION:-1.0.0.0-SNAPSHOT}"
TOOLCHAIN_HOST_FILE="$(readlink -e ./.github/workflows/toolchains/toolchain-cmake-host-ubuntu2004.cmake)" HOST_CMAKE_INCLUDES_FILE="$(readlink -e ./.github/workflows/toolchains/cmake-includes-ubuntu2004.cmake)"
TOOLCHAIN_FILE="$(readlink -e ./.github/workflows/toolchains/toolchain-arm64.cmake)" TOOLCHAIN_FILE="$(readlink -e ./.github/workflows/toolchains/toolchain-arm64.cmake)"
# Create missing dirs # Create missing dirs
@ -20,7 +20,7 @@ cmake \
-DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" \
-DTD_ENABLE_LTO=OFF \ -DTD_ENABLE_LTO=OFF \
-DTD_ENABLE_JNI=ON \ -DTD_ENABLE_JNI=ON \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_HOST_FILE}" \ -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${HOST_CMAKE_INCLUDES_FILE}" \
.. ..
cmake --build . --target prepare_cross_compiling "-j$(nproc)" cmake --build . --target prepare_cross_compiling "-j$(nproc)"
cmake --build . --target td_generate_java_api "-j$(nproc)" cmake --build . --target td_generate_java_api "-j$(nproc)"

View File

@ -10,5 +10,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -stdlib=libc++ -fno-exc
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi")
# Use LLD on linux # Use LLD on linux
#add_link_options("-fuse-ld=lld" "-rtlib=compiler-rt" "-unwindlib=libunwind" "-Wl,--as-needed")
add_link_options("-fuse-ld=lld") add_link_options("-fuse-ld=lld")