Repository navigation
Conversation
The self-test sources were about 40% of libhttrack's compiled code, and nothing in the app can reach -#test, which is the only entry point that runs them. Engine #2036 added the HTS_NO_SELFTEST guard around that call site, so define it here and drop the 24 self-test sources from the libhttrack source list. Both halves are needed. A self-test source compiled under the macro fails on the #error in htsselftest_int.h, and defining nothing while the sources are gone leaves hts_selftest undefined at link time. Measured on a release build at pin b0972289: the unsigned APK falls from 24430732 to 22612108 bytes, libhttrack.so from 8619880 to 7732952 on arm64-v8a and from 8943032 to 8015128 on x86_64. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The engine's self-tests were about 40% of libhttrack's compiled code, and nothing in the app can reach
-#test. So the build now definesHTS_NO_SELFTESTand drops the 24 self-test sources. On a release build the unsigned APK falls from 24430732 to 22612108 bytes, andlibhttrack.soloses about 10% on both ABIs.There is no test here because the build already refuses each half alone. A self-test source compiled under the macro fails on the
#errorinhtsselftest_int.h. Removing the macro while the sources are gone givesld.lld: error: undefined symbol: hts_selftest.