Optional modules such as
- Flight (and its dependents, including OpenSSL)
are all linked unconditionally to pyarrow.lib. It would be better IMHO to only link these libraries to the corresponding Cython extension rather than link everything to every extension.
Relatedly, libraries like OpenSSL are being included in linking with all shared libraries. We should clean this up to only link to the relevant shared libraries where it is required, like libparquet (for encryption support) and libarrow_flight (for using gRPC with TLS)