Skip to content

Symbols check: rewrite shells scripts to python, and add more checks

Eric Engestrom requested to merge eric/mesa:symbols-check into master

I've re-written this in bash a couple times over the years, and then I realised python is much more portable and already required by Mesa, so we might as well make use of it.

I decided to still use the build system's NM instead of re-implementing symbols extraction, to offload the complexity of keeping it compatible with many systems (Linux, Unix, BSD, MacOS, etc.), especially when cross-building.

The new script checks not only that nothing is exported when it shouldn't be (which is what the old scriptd did), but also that everything that should be exported is. Sometimes, some symbols can be exported but don't have to be, in which case they can be prefixed with (optional) .

While at it, I've added symbols checks to anv, radv, turnip, and libglapi.

Edited by Eric Engestrom

Merge request reports