Skip to content

Commit

Permalink
bundle-library: Add optional Makefile target
Browse files Browse the repository at this point in the history
make bundle-library can be used by third party developers that want to
statically link against duckdb library to generate a single static library
comprised of all statically built extensions and all necessary third party
libraries

Solves (to some degree) duckdb#9475 and issue
encountered in the go-duckdb API while bundling extensions
  • Loading branch information
carlopi committed Feb 7, 2024
1 parent b92cb1a commit 910832c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Expand Up @@ -427,3 +427,13 @@ generate-files:
python3 scripts/generate_functions.py
python3 scripts/generate_serialization.py
python3 scripts/generate_enum_util.py

bundle-library: release
cd build/release && \
mkdir -p bundle && \
cp src/libduckdb_static.a bundle/. && \
cp third_party/*/libduckdb_*.a bundle/. && \
cp extension/*/lib*_extension.a bundle/. && \
cd bundle && \
find . -name '*.a' -exec ${AR} -x {} \; && \
${AR} cr ../libduckdb_bundle.a *.o

0 comments on commit 910832c

Please sign in to comment.