API usage: add 'basic' configuration #543
Merged
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.
This adds a new configuration file, 'contrib/conftest/basic.dfa' which disables unused APIs on a test Linux-based system. So support the configuration several fixes were necessary in the test programs so that the tests are skipped correctly when APIs are not available.
The configuration has been tested on a range of common Linux apps including web browser code (qtwebengine), image processing code (e.g. ImageMagick) and general display code (X11, Qt5 and Qt6, KDE). Overall this first step reduces libpng linked code and data size to about 2/3 of the full configuration.
To use the new test simply copy basic.dfa to 'pngusr.dfa' in the root of the source directory and build.