summaryrefslogtreecommitdiffstats
path: root/bin/symbols-check.py
Commit message (Collapse)AuthorAgeFilesLines
* meson: add windows support to symbols checksEric Engestrom2019-11-051-3/+41
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviwed-by: Dylan Baker <dylan@pnwbakers>
* symbols-check: ignore exported C++ symbolsEric Engestrom2019-10-131-0/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* symbols-check: fix `nm` invocation on MacOSEric Engestrom2019-08-041-4/+14
| | | | | | | | | | | | | | | | | | According to Mac OSX's man page [1], this is how we should get the list of exported symbols: nm -g -P foo.dylib -g to only show the exported symbols -P to show it in a "portable" format, ie. readable by a script Since this is supported by GNU nm as well, let's use that everywhere, although some care needs to be taken as there are some differences in the output. [1] https://www.unix.com/man-page/osx/1/nm/ Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Vinson Lee <[email protected]>
* symbols-check: discard platform symbols earlyEric Engestrom2019-08-041-2/+2
| | | | | | | (as the comment there already claimed) Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Vinson Lee <[email protected]>
* symbols-check: skip test if we can't get the symbols listEric Engestrom2019-08-041-1/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Vinson Lee <[email protected]>
* symbols-check: introduce new python scriptEric Engestrom2019-07-101-0/+115
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. This new script checks not only that nothing is exported when it shouldn't be, 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)`. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>