Skip to content

Commit

Permalink
Merge pull request #133 from lnkuiper/jemalloc
Browse files Browse the repository at this point in the history
Bundle jemalloc
  • Loading branch information
hannes authored Jan 31, 2025
2 parents 84b44cd + 2be02c1 commit 45e5a92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/Java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- run: make format-check
- run: |
python3 -m pip install --user clang_format==11.0.1
make format-check
java-linux-amd64:
name: Java Linux (amd64)
Expand Down
10 changes: 10 additions & 0 deletions vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import json
import pickle
import platform
import argparse

parser = argparse.ArgumentParser(description='Inlines DuckDB Sources')
Expand All @@ -17,6 +18,15 @@
# list of extensions to bundle
extensions = ['core_functions', 'parquet', 'icu', 'json']

# Conditionally include jemalloc
is_android = hasattr(sys, 'getandroidapilevel')
is_pyodide = 'PYODIDE' in os.environ
use_jemalloc = (
not is_android and not is_pyodide and platform.system() == 'Linux' and platform.architecture()[0] == '64bit'
)
if use_jemalloc:
extensions.append('jemalloc')

# path to target
basedir = os.getcwd()
target_dir = os.path.join(basedir, 'src', 'duckdb')
Expand Down

0 comments on commit 45e5a92

Please sign in to comment.