This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new 81711045 fix: Force static library build on Windows when building with
Meson (#496)
81711045 is described below
commit 81711045e8bb4ded1cb3b5a6fa354b35f18aa4e7
Author: William Ayd <[email protected]>
AuthorDate: Tue May 28 20:31:59 2024 -0400
fix: Force static library build on Windows when building with Meson (#496)
May not necessarily fix
https://github.com/apache/arrow-nanoarrow/issues/495 but reasonably
defers trying to solve
---
src/nanoarrow/meson.build | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/nanoarrow/meson.build b/src/nanoarrow/meson.build
index f60772aa..801440ea 100644
--- a/src/nanoarrow/meson.build
+++ b/src/nanoarrow/meson.build
@@ -39,13 +39,24 @@ configure_file(input: 'nanoarrow_config.h.in',
output: 'nanoarrow_config.h',
configuration: conf_data)
-nanoarrow_lib = library(
+# Windows shared libraries are not exporting the right symbols
+# See https://github.com/mesonbuild/wrapdb/pull/1536#issuecomment-2136011408
+# and https://github.com/apache/arrow-nanoarrow/issues/495
+if host_machine.system() == 'windows'
+ libtype = 'static_library'
+else
+ libtype = 'library'
+endif
+
+nanoarrow_lib = build_target(
'nanoarrow',
'array.c',
'schema.c',
'array_stream.c',
'utils.c',
- install: true)
+ install: true,
+ target_type: libtype,
+)
curdir = include_directories('.') # only needed when used as subproject?
incdir = include_directories('..')