-
Notifications
You must be signed in to change notification settings - Fork 0
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
leveldown - build workaround #1
Comments
The iOS workaround mentioned in this issue was included in leveldown, so it shouldn't be needed anymore: |
The Android workaround mentioned in this issue was included in leveldown, so it shouldn't be needed anymore: Level/leveldown#446 |
@jaimecbernardo Could you tell me what compile commands did you use for leveldown on Android and iOS? |
Hi @blueye , |
leveldown
iOS
For building leveldown for iOS, you need to add settings similar to the ones you have on macOS.
1 - Add a line for iOS after the mac line in
deps/snappy/snappy.gyp
https://github.com/Level/leveldown/blob/8b03831f1d826c326c14555e471f45bffd817fe9/deps/snappy/snappy.gyp#L6 :2 - Add a section in
deps/leveldb/leveldb.gyp
https://github.com/Level/leveldown/blob/8b03831f1d826c326c14555e471f45bffd817fe9/deps/leveldb/leveldb.gyp#L131-L144 similar to the one for macOS:3 - Add a
|| defined(OS_IOS)
next to everydefined(OS_MACOSX)
check in deps/leveldb/leveldb-1.20/port/port_posix.h https://github.com/Level/leveldown/blob/8b03831f1d826c326c14555e471f45bffd817fe9/deps/leveldb/leveldb-1.20/port/port_posix.h#if defined(OS_MACOSX) || defined(OS_IOS)
#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_FREEBSD) ||\
android
leveldown builds out of the box for the Android armv7 architecture.
For
x86
, the NDK doesn't seem to be able to provide 128 bit intrinsics, so you need to replace this line indeps/snappy/snappy-1.1.4/snappy.cc
https://github.com/Level/leveldown/blob/8b03831f1d826c326c14555e471f45bffd817fe9/deps/snappy/snappy-1.1.4/snappy.cc#L98Replace:
with
The text was updated successfully, but these errors were encountered: