When linking avifenc with the merged static lib libavif.a, we still link with libaom.a, libdav1d.a, etc. unnecessarily. I believe the linker won't use libaom.a, libdav1d.a, etc. because the object files in libavif.a satisfy all the symbol references.
Codec libraries are present twice: within the merged libavif.a and as their own codec libraries. They need to be removed from the dependencies. I propose https://github.com/AOMediaCodec/libavif/pull/1680
@fdintino @vrabaud
When linking avifenc with the merged static lib libavif.a, we still link with libaom.a, libdav1d.a, etc. unnecessarily. I believe the linker won't use libaom.a, libdav1d.a, etc. because the object files in libavif.a satisfy all the symbol references.
Here is the command line on Linux:
$ ninja -v avifenc [1/1] : && /usr/bin/c++ -g CMakeFiles/avifenc.dir/apps/avifenc.c.o -o avifenc libavif_apps.a libavif.a /home/wtc/libavif.1/libavif/ext/dav1d/build/src/libdav1d.a /home/wtc/libavif.1/libavif/ext/libgav1/build/libgav1.a /home/wtc/libavif.1/libavif/ext/SVT-AV1/Bin/Release/libSvtAv1Enc.a /home/wtc/libavif.1/libavif/ext/aom/build.libavif/libaom.a /home/wtc/libavif.1/libavif/ext/libyuv/build/libyuv.a /home/wtc/libavif.1/libavif/ext/libwebp/build/libsharpyuv.a -lm -ldl /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libjpeg.so && :