Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output extension to a sub-directory that respect the input mode/feature #1527

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions scripts/build_loadable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ set -euo pipefail

trap exit SIGINT

PROJECT_ROOT="$(cd $(dirname "$BASH_SOURCE[0]") && cd .. && pwd)" &> /dev/null
MODE=$1
FEATURE=$2
INPUT_PATH=./build/${MODE}/${FEATURE}/
OUTPUT_PATH=loadable_extensions/${MODE}/${FEATURE}/

mkdir -p loadable_extensions
mkdir -p "${OUTPUT_PATH}"
shopt -s nullglob

for f in `find ./build/$1/$2 -name '*.duckdb_extension'`
for ext_path in $(find "${INPUT_PATH}" -name '*.duckdb_extension')
do
ext=`basename $f .duckdb_extension`
echo "Building '$ext'..."
emcc $f -sSIDE_MODULE=1 -o loadable_extensions/$ext.duckdb_extension.wasm -O3
ext_name=$(basename "$ext_path" .duckdb_extension)
echo "Building '$ext_name'..."
emcc "$ext_path" -sSIDE_MODULE=1 -o "${OUTPUT_PATH}/$ext_name.duckdb_extension.wasm" -O3
done

ls -la loadable_extensions