Build against vanilla OpenSSL 1.1.0h (#125)

Summary:
This uses OpenSSL 1.1.0h to build and link against. The `.so`s are
precompiled and hand-patched from [this
repository](https://github.com/passy/android-database-sqlcipher). The
patching was necessary to fix the `SONAME` and corresponding `NEEDED`
flags to *not* contain a `.1.1` version suffix as Gradle will refuse to
bundle those.

We basically only use the headers for the remaining part.

The precompiled version contains ABI support for `arm64-v8a`, `armeabi`,
`armeabi-v7a`, `x86` and most importantly `x86_64`. HOWEVER, `x86_64` is
still excluded for now because folly fails to compile due to a missing
compiler flag:

```
error: needs target feature pclmul
```

This should be easily fixable by ensuring that `-mpclmul` is added to
the CFLAGS if we're compiling for an `x86_64` target in the
`CMakeLists.txt` for Folly.

Closes #113.
Closes https://github.com/facebook/Sonar/pull/125

Reviewed By: priteshrnandgaonkar

Differential Revision: D8723636

Pulled By: passy

fbshipit-source-id: 41c61047d2793ebaef5793a3c937c4d628471d6a
This commit is contained in:
Pascal Hartig
2018-07-03 13:09:53 -07:00
committed by Facebook Github Bot
parent bcc47bfe0c
commit 69711642c9
22 changed files with 32 additions and 28 deletions

View File

@@ -18,7 +18,6 @@ include ':sample'
include ':doubleconversion'
include ':glog'
include ':libevent'
include ':openssl'
include ':rsocket'
project(':fbjni').projectDir = file('libs/fbjni')
@@ -30,5 +29,4 @@ project(':doubleconversion').projectDir = file('android/build/third-party-ndk/do
project(':glog').projectDir = file('android/build/third-party-ndk/glog/')
project(':folly').projectDir = file('android/build/third-party-ndk/folly/')
project(':libevent').projectDir = file('android/build/third-party-ndk/LibEvent/')
project(':openssl').projectDir = file('android/build/third-party-ndk/OpenSSL/openssl-android-1.0.0')
project(':rsocket').projectDir = file('android/build/third-party-ndk/RSocket')