This was originally part of the CMake switchover, but was removed because it was an addition, rather than a port. Add it now.
See https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-fvisibility-inlines-hidden:
This switch declares that the user does not attempt to compare pointers to inline functions or methods where the addresses of the two functions are taken in different shared objects.
The effect of this is that GCC may, effectively, mark inline methods with attribute ((visibility ("hidden"))) so that they do not appear in the export table of a DSO
See also https://cmake.org/cmake/help/latest/prop_tgt/VISIBILITY_INLINES_HIDDEN.html.
When building for macOS, this will also enable -fvisibility-inlines-hidden-static-local-var.