From b802aaec1478db44702d0dce4ff3feba99d36e40 Mon Sep 17 00:00:00 2001 From: taniabogatsch <44262898+taniabogatsch@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:18:23 +0200 Subject: [PATCH] add latest duckdb changes --- .github/workflows/deps.yaml | 1 - 0001-Add-static-flag-to-duckdb.patch | 55 ---------------------------- Makefile | 2 - cgo_static.go | 2 +- 4 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 0001-Add-static-flag-to-duckdb.patch diff --git a/.github/workflows/deps.yaml b/.github/workflows/deps.yaml index 9e9b8497..8739017c 100644 --- a/.github/workflows/deps.yaml +++ b/.github/workflows/deps.yaml @@ -8,7 +8,6 @@ on: paths: - ".github/workflows/**" - "Makefile" - - "*.patch" jobs: prepare: runs-on: ubuntu-20.04 diff --git a/0001-Add-static-flag-to-duckdb.patch b/0001-Add-static-flag-to-duckdb.patch deleted file mode 100644 index 9fbf442a..00000000 --- a/0001-Add-static-flag-to-duckdb.patch +++ /dev/null @@ -1,55 +0,0 @@ -From c826ed2a5d08711bc5c3a2482b9a00e971dcf819 Mon Sep 17 00:00:00 2001 -From: Jaap Aarts -Date: Tue, 25 Jun 2024 20:40:26 +0200 -Subject: [PATCH] Add static flag to duckdb - ---- - src/include/duckdb.h | 50 +++++++++++++++------------- - src/include/duckdb/common/winapi.hpp | 6 +++- - 2 files changed, 32 insertions(+), 24 deletions(-) - -diff --git a/src/include/duckdb.h b/src/include/duckdb.h -index cdd543c6df..9ef1c83001 100644 ---- a/src/include/duckdb.h -+++ b/src/include/duckdb.h -@@ -12,11 +12,15 @@ - //! duplicate of duckdb/main/winapi.hpp - #ifndef DUCKDB_API - #ifdef _WIN32 -+#ifdef DUCKDB_STATIC -+#define DUCKDB_API -+#else - #if defined(DUCKDB_BUILD_LIBRARY) && !defined(DUCKDB_BUILD_LOADABLE_EXTENSION) - #define DUCKDB_API __declspec(dllexport) - #else - #define DUCKDB_API __declspec(dllimport) - #endif -+#endif - #else - #define DUCKDB_API - #endif -diff --git a/src/include/duckdb/common/winapi.hpp b/src/include/duckdb/common/winapi.hpp -index 1b77335ca9..fb1034d3c1 100644 ---- a/src/include/duckdb/common/winapi.hpp -+++ b/src/include/duckdb/common/winapi.hpp -@@ -9,12 +9,16 @@ - #pragma once - - #ifndef DUCKDB_API --#if defined(_WIN32) && !defined(__MINGW32__) -+#ifdef _WIN32 -+#ifdef DUCKDB_STATIC -+#define DUCKDB_API -+#else - #if defined(DUCKDB_BUILD_LIBRARY) && !defined(DUCKDB_BUILD_LOADABLE_EXTENSION) - #define DUCKDB_API __declspec(dllexport) - #else - #define DUCKDB_API __declspec(dllimport) - #endif -+#endif - #else - #define DUCKDB_API - #endif --- -2.45.2 - diff --git a/Makefile b/Makefile index 8265a0e9..a0853eec 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,6 @@ test: .PHONY: deps.header deps.header: git clone -b ${DUCKDB_BRANCH} --depth 1 ${DUCKDB_REPO} - - cd duckdb && git apply --verbose ../0001-Add-static-flag-to-duckdb.patch cp duckdb/src/include/duckdb.h duckdb.h .PHONY: duckdb diff --git a/cgo_static.go b/cgo_static.go index 9cba15d1..e833f37e 100644 --- a/cgo_static.go +++ b/cgo_static.go @@ -3,7 +3,7 @@ package duckdb /* -#cgo CPPFLAGS: -DDUCKDB_STATIC +#cgo CPPFLAGS: -DDUCKDB_STATIC_BUILD #cgo LDFLAGS: -lduckdb #cgo darwin,amd64 LDFLAGS: -lc++ -L${SRCDIR}/deps/darwin_amd64 #cgo darwin,arm64 LDFLAGS: -lc++ -L${SRCDIR}/deps/darwin_arm64