Enable LTO

This commit is contained in:
Andrea Cavalli 2022-03-06 22:37:07 +01:00
parent 23f78fe106
commit 70d1349c05
3 changed files with 3 additions and 1 deletions

View File

@ -108,6 +108,7 @@ cmake \
"-DTd_DIR=$(realpath -m ../td_bin/lib/cmake/Td/)" \
"-DJAVA_SRC_DIR=$(realpath -m ../src/main/jni-java-src/)" \
"-DTDNATIVES_CPP_SRC_DIR:PATH=$(realpath -m ../src/main/jni-cpp-src/)" \
"-DTD_ENABLE_LTO=ON" \
${CMAKE_EXTRA_ARGUMENTS_TDJNI} \
${CMAKE_EXTRA_ARGUMENTS} \
"$(realpath -m ../src/main/jni-cpp-src/)"

View File

@ -76,6 +76,7 @@ cmake "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \
-DTD_ENABLE_JNI=ON \
-DTD_ENABLE_LTO=ON \
${CMAKE_EXTRA_ARGUMENTS_TD} \
${CMAKE_EXTRA_ARGUMENTS} \
../implementation

View File

@ -79,7 +79,7 @@ fi
echo "Configuring CMake..."
mkdir ./generated/td_tools/
cd ./generated/td_tools/
cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON ${CMAKE_EXTRA_ARGUMENTS} ../implementation/
cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DTD_ENABLE_LTO=ON ${CMAKE_EXTRA_ARGUMENTS} ../implementation/
# Run cmake to generate common tools
echo "Generating cross compilation tools..."