build-package.sh: make it possible to disable termux-elf-cleaner

Just set TERMUX_PKG_NO_ELF_CLEANER=true in build.sh.
This commit is contained in:
Leonid Pliushch 2020-10-01 19:33:58 +03:00
parent c3267e962d
commit c80220e31d
2 changed files with 5 additions and 2 deletions

View File

@ -27,8 +27,10 @@ termux_step_massage() {
set -e -o pipefail
fi
# Remove entries unsupported by Android's linker:
find . \( -path "./bin/*" -o -path "./lib/*" -o -path "./libexec/*" \) -type f -print0 | xargs -r -0 "$TERMUX_ELF_CLEANER"
if [ "$TERMUX_PKG_NO_ELF_CLEANER" != "true" ]; then
# Remove entries unsupported by Android's linker:
find . \( -path "./bin/*" -o -path "./lib/*" -o -path "./libexec/*" \) -type f -print0 | xargs -r -0 "$TERMUX_ELF_CLEANER"
fi
# Fix shebang paths:
while IFS= read -r -d '' file

View File

@ -135,6 +135,7 @@ termux_step_setup_variables() {
TERMUX_PKG_HAS_DEBUG=true # set to false if debug build doesn't exist or doesn't work, for example for python based packages
TERMUX_PKG_METAPACKAGE=false
TERMUX_PKG_QUICK_REBUILD=false # set this temporarily when iterating on a large package and you don't want the source and build directories wiped every time you make a mistake
TERMUX_PKG_NO_ELF_CLEANER=false # set this to true to disable running of termux-elf-cleaner on built binaries
unset CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
}