kou commented on code in PR #47282:
URL: https://github.com/apache/arrow/pull/47282#discussion_r2335141617


##########
cpp/src/arrow/meson.build:
##########
@@ -420,19 +481,38 @@ foreach key, val : arrow_components
     arrow_deps += val.get('dependencies', [])
 endforeach
 
+arrow_lib_cpp_shared_args = ['-DARROW_EXPORTING', '-DURI_LIBRARY_BUILD']
+if needs_compute
+    arrow_lib_cpp_shared_args += ['-DARROW_COMPUTE_EXPORTING']
+endif
+
 arrow_lib = library(
     'arrow',
     sources: arrow_srcs,
     include_directories: arrow_includes,
     dependencies: arrow_deps,
     install: true,
     gnu_symbol_visibility: 'inlineshidden',
-    cpp_shared_args: ['-DARROW_EXPORTING'],
+    gnu_symbol_visibility: 'hidden',
+    c_shared_args: [
+        '-DARROW_EXPORTING',
+        '-DURI_LIBRARY_BUILD',
+        '-DURI_VISIBILITY',

Review Comment:
   Ah, I want to confirm whether `arrow_lib_cpp_shared_args` needs 
`-DURI_VISIBILITY` or not.



##########
cpp/src/arrow/flight/meson.build:
##########
@@ -44,7 +44,25 @@ install_headers(
     subdir: 'arrow/flight',
 )
 
-grpc_dep = dependency('grpc++')
+grpc_opts = []
+if cpp_compiler.get_id() == 'msvc'
+    grpc_opts += [
+        'openssl:asm=disabled',  # asm cannot compile on Windows
+        're2:default_library=static',  # re2 does not export symbols
+    ]
+endif
+
+# Due to the Meson bug in https://github.com/mesonbuild/meson/issues/14905
+# we need to special how the grpc_cpp_plugin resolution is handled
+# when found on the system versus when built as a subproject
+grpc_cpp_dep = dependency('grpc++', allow_fallback: false, required: false)
+if grpc_cpp_dep.found()
+    has_system_grpc = true
+else
+    grpc_cpp_dep = dependency('grpc++')
+    has_system_grpc = false
+endif

Review Comment:
   Can we simplify this?
   
   ```suggestion
   has_system_grpc = grpc_cpp_dep.found()
   if not has_system_grpc
       grpc_cpp_dep = dependency('grpc++')
   endif
   ```



-- 
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