Adarsh-Me commented on code in PR #51315:
URL: https://github.com/apache/arrow/pull/51315#discussion_r3997123910


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -549,9 +549,16 @@ set(ARROW_VENDORED_SRCS
     vendored/uriparser/UriRecompose.c
     vendored/uriparser/UriResolve.c
     vendored/uriparser/UriShorten.c)
-if(APPLE)
+if(APPLE AND NOT ARROW_USE_STD_CHRONO)
   list(APPEND ARROW_VENDORED_SRCS vendored/datetime/ios.mm)
 endif()
+if(ARROW_USE_STD_CHRONO)

Review Comment:
   Fixed at 7b99c74fe: the TU is now only removed when Gandiva is **not** built 
(`if(ARROW_USE_STD_CHRONO AND NOT ARROW_GANDIVA)`). Gandiva's `cast_time.cc` / 
`gdv_function_stubs.cc` keep their `locate_zone`/`zoned_time` definitions, so 
`ARROW_USE_STD_CHRONO=ON` + `ARROW_GANDIVA=ON` links; migrating those call 
sites to the standard backend can come later under GH-51267.



##########
cpp/src/arrow/config.cc:
##########
@@ -91,7 +103,11 @@ RuntimeInfo GetRuntimeInfo() {
 Status Initialize(const GlobalOptions& options) noexcept {
   ARROW_SUPPRESS_DEPRECATION_WARNING
   if (options.timezone_db_path.has_value()) {
-#if !USE_OS_TZDB
+#if defined(ARROW_USE_STD_CHRONO) && ARROW_USE_STD_CHRONO
+    return Status::Invalid(
+        "Arrow was built with C++20 std::chrono and uses the OS timezone 
database, "
+        "so a downloaded database cannot be provided at runtime.");

Review Comment:
   Fixed at 7b99c74fe on the R side: `runtime_info()` now reports 
`using_os_timezone_db` (third element, "true"/"false"), and `configure_tzdb()` 
skips `set_timezone_database(tzdb::tzdb_path("text"))` entirely when the 
runtime reads the OS timezone database — exactly the std::chrono case here. So 
R no longer surfaces the false "timezones will not be available" startup 
warning on this backend; the tzdb package path is only used when Arrow actually 
consumes a vendored, non-OS database (preserving the GH-49866 MinGW behavior). 
`arrow_info()` exposes the flag as `runtime_info$using_os_timezone_db` too.



##########
cpp/src/arrow/util/config.h.cmake:
##########
@@ -54,6 +54,7 @@
 #cmakedefine ARROW_HDFS
 #cmakedefine ARROW_S3
 #cmakedefine ARROW_USE_GLOG
+#cmakedefine01 ARROW_USE_STD_CHRONO

Review Comment:
   Fixed at 7b99c74fe: `config.h.cmake` now emits 
`@ARROW_USE_STD_CHRONO_DEFINITION@`, which the build system resolves as — 
`#define ARROW_USE_STD_CHRONO 1` / `0` when the option is defined (explicit 
ON/OFF, AUTO-resolved), and `/* #undef ARROW_USE_STD_CHRONO */` when it is 
unset (subproject with `ARROW_DEFINE_OPTIONS=OFF`). The undefined state 
restores `chrono_internal.h`'s platform fallback for those builds, while an 
explicit OFF keeps `0` so the fallback cannot re-enable std::chrono against the 
user's choice. The Meson side sets the same definition key from its resolved 
option (Meson options always resolve, so there is no unset case there).



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