I have seen the suggestion of a command line option, and the option of a file next to the tool, but I haven't seen a suggestion of what Qt does for the last 11 years for plugin loading, which has many of the same challenges with cross-compiling etc. That is - embed the metadata into the binary itself and read the data from a readonly section of the binary:

$ objcopy /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqtiff.so /dev/null --dump-section .qtmetadata=/dev/stdout
QTMETADATA !�x1org.qt-project.Qt.QImageIOHandlerFactoryInterfacekQTiffPlugin�dKeys�dtiffctifiMimeTypes�jimage/tiffjimage/tiff


I think in Qt 6 it works the same way, but the plugins have cbor data encoded in them. This allows Qt to know whether a plugin can load .jpg or .png etc.

https://lists.qt-project.org/pipermail/development/2012-February/001827.html

You could try to pursue something similar, but it would assume/require a way to read data sections from a binary.

Thanks,

Stephen


On 15/06/2023 13:06, René Ferdinand Rivera Morell via SG15 wrote:
On Fri, Jun 2, 2023 at 4:32 PM Tom Honermann <tom@honermann.net> wrote:
On 6/2/23 5:08 PM, Olga Arkhipova wrote:
I believe that IDEs and different generators will very likely be interested in build tool capabilities. And those IDE/generators processes might not even be able to launch a tool as they are not necessarily running in the environment the tool can run. Or they might be running on a different OS altogether for some cross-platform development.
This is a very good point.
Can someone point out some concrete examples of that situation that I
can investigate? As I'm not familiar with that use case.