Skip to content

Draft: Build piglit util as DLL.

Jose Fonseca requested to merge jrfonseca/piglit:cmake-win32-dll into main

/cc @charmainel @bhenden @kusma @jenatali

This is a proof of concept, with just enough to get gl-1.0-textured-triangle test to build using DLL instead of statically linking with piglitutil_xxx libraries.

I don't plan to finish this myself, but if anybody else get s bothered with the fact that piglit Windows builds generate many gigabytes worth of executables (9.2Gb on a MinGW build to be precise), this is the way to go IMHO.

The trick here is to only make piglitutil_gl a DLL. This prevents us having to deal with multiple dllimport/dllexport macros. I verified it works with MinGW and MSVC.

To work with all tests, one would need to ensure all symbols have PIGLIT_EXTERN.

Merge request reports