GH-46714: [C++] Use hidden symbol visibility in Meson configuration
Rationale for this change
This will eventually make it easier to support Windows through the Meson configuration, while also providing the documented benefits of hidden symbol visibility
What changes are included in this PR?
Meson libraries have been set to use hidden symbol visibility, and corresponding definitions have been updated to use the ARROW_EXPORT macro
Are these changes tested?
Yes
Are there any user-facing changes?
No
- GitHub Issue: #46714
:warning: GitHub issue #46714 has been automatically assigned in GitHub to PR creator.
FWIW the hidden symbol visibility appears to shave a couple MB off of the libarrow release size (43MB -> 41 MB locally)
This will eventually make it easier to support Windows through the Meson configuration
Why is that?
This will eventually make it easier to support Windows through the Meson configuration
Why is that?
The idea is just that Windows has a harder requirement around symbols not being public by default. Of course, there are extra macros that would need to be defined to fully support the Windows linker requirements, but this is at least a sanity check that we are exporting the right symbols. I am also under the assumption that most developers are on *nix platforms, so it helps them detect potential symbol export issues sooner, rather than waiting for them to pop up in Windows CI
It would be nice to try applying those changes on the CMake side as well. I agree that it would be good hygiene to have to mark exported symbols explicitly.
It would be nice to try applying those changes on the CMake side as well. I agree that it would be good hygiene to have to mark exported symbols explicitly.
Any objection to doing this as a follow up? I did try that previously and ran into issues with some of the downstream crossbow jobs specifically on macOS, so I'm a bit hesitant to be opening a pandora's box with the CMake config in this PR
No, it's fine.
OK all green with the new compute structure in place. Let me know if any more feedback
Hey @kou no rush on this if you have been busy with pre-release activities, but if you have any time would appreciate another look. Thanks!
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 3b3684bb7d400b1f93d9aa17ff8f6c98641abea4.
There were no benchmark performance regressions. 🎉
The full Conbench report has more details.