Skip to content

Commit f59785f

Browse files
committed
Added wasm binary with compile script additions
1 parent 27bf797 commit f59785f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

lmdb/Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Using mingw to compile Windows native libs for x86 and x64
22
brew "mingw-w64"
3+
brew "emscripten"
34
cask "android-ndk"

lmdb/compile-lmdb-macos.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ declare -A supported_targets=(
2323
[android-arm/native/liblmdb.so]="make CC=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang AR=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar LDFLAGS='-s' XCFLAGS='-UMDB_USE_ROBUST -DMDB_USE_POSIX_MUTEX -DANDROID -DNDEBUG'"
2424
[android-x86/native/liblmdb.so]="make CC=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android21-clang AR=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar LDFLAGS='-s' XCFLAGS='-UMDB_USE_ROBUST -DMDB_USE_POSIX_MUTEX -DANDROID -DNDEBUG'"
2525
[android-x64/native/liblmdb.so]="make CC=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android21-clang AR=$NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar LDFLAGS='-s' XCFLAGS='-UMDB_USE_ROBUST -DMDB_USE_POSIX_MUTEX -DANDROID -DNDEBUG'"
26+
[browser-wasm/native/liblmdb.wasm]="emmake make LDFLAGS='-s' XCFLAGS='-DNDEBUG'"
2627
)
2728

2829
function compile_lib() {
@@ -38,7 +39,7 @@ function compile_lib() {
3839
echo "$2 $output_hash"
3940
build_outputs["$output_hash"]="$2"
4041
cp ./liblmdb.so ../../../../src/LightningDB/runtimes/"$2"
41-
sleep 10
42+
sleep 10
4243
#seems to be a stateful race condition on the docker run processes so this allows everything to succeed
4344
}
4445

@@ -50,4 +51,4 @@ if [ ${#supported_targets[@]} -eq ${#build_outputs[@]} ]; then
5051
echo "All builds for lmdb supported targets have succeeded"
5152
else
5253
echo "Not all supported targets have produced unique output"
53-
fi
54+
fi
Binary file not shown.

0 commit comments

Comments
 (0)