FYI: I found that "__attribute__((visibility("internal"))) extern" works just fine on MacOS.
I've enabled LUAI_FUNC etc. in my build of Lua 5.5 (work) by changing "defined(__ELF__)" to
"( defined(__ELF__) || defined(__MACH__) )" which enables it.
This cleans up the symbol table in the same way as on Linux.
--