adamreeve opened a new pull request, #41599:
URL: https://github.com/apache/arrow/pull/41599

   ### Rationale for this change
   
   Allow Windows users to more easily build the GLib libraries.
   
   ### What changes are included in this PR?
   
   * Minor fixes to allow building with MSVC:
     * Changes some uses of variable length arrays to `std::vector`, because 
MSVC doesn't support variable length arrays
     * Moves some function definitions that use C++ types outside of 
`G_BEGIN_DECLS`/`G_END_DECLS` blocks (which expand to `extern C { }`), because 
this caused MSVC to error
   * Fix libraries not having any exported symbols with MSVC, which defaults to 
hiding symbols
     * Add `visibility.h` which defines a new `GARROW_EXPORT` macro, and add 
this to the functions that need to be exported in arrow-glib
     * I initially wanted to overload the `GARROW_AVAILABLE_IN_*` macros to 
also add `GARROW_EXPORT`, but realised this wouldn't work with the libraries 
other than arrow-glib, as they need to have separate export macros to allow 
correctly switching between dllimport and dllexport depending on the library 
being built. Adding `GARROW_EXPORT` explicitly everywhere is a lot more verbose 
but I'm not sure there's a better way. We could have separate `version.h` 
headers for each library with different macros, eg. 
`GARROW_DATASET_AVAILALBE_IN...` but that seemed like it could get pretty 
complicated.
   * Add a new CI job that builds the GLib libraries with MSVC on Windows, 
using vcpkg to install pkgconfig and glib.
   * For now only `arrow-glib` is built, I can follow up with the other 
libraries after this PR
   
   ### Are these changes tested?
   
   The build will be tested in CI but I've only done some quick manual tests 
that the built library works correctly, I haven't got the ruby tests running 
against the build yet.
   
   ### Are there any user-facing changes?
   
   No? Eventually some documentation should be updated when all the GLib 
libraries can be built with MSVC though


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to