From 498b17ec773ad7b23a7bf834b1a52125503e89e3 Mon Sep 17 00:00:00 2001 From: Mandy Alimaa Date: Thu, 15 Oct 2026 12:04:45 -0500 Subject: [PATCH] fix: embed timezone data in Go shared libraries --- adbc_drivers_dev/make_config.py | 3 ++- tests/test_make.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/adbc_drivers_dev/make_config.py b/adbc_drivers_dev/make_config.py index 94f4b7a..1cd1014 100644 --- a/adbc_drivers_dev/make_config.py +++ b/adbc_drivers_dev/make_config.py @@ -393,7 +393,8 @@ def build_plan(self, config: MakeEnv) -> MakePlan: # Embed Go version f"-X {_GO_VERSION_FLAG}={config.version}", ] - tags = ["driverlib"] + # Include IANA timezone data when the host has no timezone database. + tags = ["driverlib", "timetzdata"] if config.debug: tags.append("assert") tags.extend(self.lang.build_tags) diff --git a/tests/test_make.py b/tests/test_make.py index 5b9ff23..fe63cb3 100644 --- a/tests/test_make.py +++ b/tests/test_make.py @@ -228,7 +228,7 @@ def test_go_linux_amd64(go_driver_root: tuple[Path, Path]) -> None: "module", "build", "-buildmode=c-shared", - "-tags=driverlib,custom_feature,release_feature", + "-tags=driverlib,timetzdata,custom_feature,release_feature", "-ldflags=-w -X github.com/adbc-drivers/driverbase-go/driverbase.infoDriverVersion=0.1.0", "-o", "build/libadbc_driver_godummy.so", @@ -247,7 +247,7 @@ def test_go_linux_amd64(go_driver_root: tuple[Path, Path]) -> None: config.debug = True plan = make_config.build_plan(config) - assert "-tags=driverlib,assert,custom_feature" in plan.commands[0] + assert "-tags=driverlib,timetzdata,assert,custom_feature" in plan.commands[0] def test_go_linux_amd64_ci(go_driver_root: tuple[Path, Path]) -> None: @@ -277,7 +277,7 @@ def test_go_linux_amd64_ci(go_driver_root: tuple[Path, Path]) -> None: "module", "build", "-buildmode=c-shared", - "-tags=driverlib", + "-tags=driverlib,timetzdata", "-ldflags=-w -X github.com/adbc-drivers/driverbase-go/driverbase.infoDriverVersion=0.1.0 -linkmode external -extldflags=-Wl,--version-script=/only-export-adbc.ld", "-o", "build/libadbc_driver_godummy.so",