Open andiwand opened 2 hours ago
Might be related to https://github.com/acts-project/acts/pull/3768
I think this direction is expected. The Python bindings target is created with pybinds helper functions and those set the respective properties.
The question for me is, if they spill over into other tagerts, which would be strange.
We don't link anything against the binding target (it links against some of our other libraries however), so I'm unsure how any flags could be propagated in that direction.
pybind11's documentation says:
It sets default visibility to hidden, which is required for some pybind11 features and functionality when attempting to load multiple pybind11 modules compiled under different pybind11 versions. It also adds additional flags enabling LTO (Link Time Optimization) and strip unneeded symbols.
about the pybind11_add_module
cmake function, which we use.
I'd have to check how they do this but I would assume it's just set on the Python module target.
I observed a couple of times that our Python bindings have extra compiler flags which are not set by us but most likely pybind11. I see for example
-fvisibility=hidden
inRelWithDebInfo
which I cannot trace back to any of our CMake. I believe in the CI we even get-flto
but could not reproduce this locally.