Skip to content

Commit

Permalink
Work with Android NDK r12b
Browse files Browse the repository at this point in the history
clang + libc++ does not work, it still requires libc++_shared.so
runtime even if -lstdc++ is used, which supposed to link with static
version of libc++.
  • Loading branch information
tatsuhiro-t committed Jul 17, 2016
1 parent f857b63 commit a00442b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
5 changes: 2 additions & 3 deletions android-config
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ PATH="$TOOLCHAIN"/bin:"$PATH"
--without-libxml2 \
--disable-python-bindings \
--disable-examples \
--enable-werror \
CC="$TOOLCHAIN"/bin/clang \
CXX="$TOOLCHAIN"/bin/clang++ \
CC="$TOOLCHAIN"/bin/arm-linux-androideabi-gcc \
CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-g++ \
CPPFLAGS="-fPIE -I$PREFIX/include" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-fPIE -pie -L$PREFIX/lib"
15 changes: 5 additions & 10 deletions doc/sources/building-android-binary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@ unpacked:

.. code-block:: text
$ build/tools/make-standalone-toolchain.sh \
--install-dir=$ANDROID_HOME/toolchain \
--toolchain=arm-linux-androideabi-4.9 \
--llvm-version=3.5 \
--platform=android-16
$ build/tools/make_standalone_toolchain.py \
--arch arm --api 16 --stl gnustl
--install-dir $ANDROID_HOME/toolchain
The additional flag ``--system=linux-x86_64`` may be required if you
are using x86_64 system.

The platform level is not important here because we don't use Android
specific C/C++ API.
The API level (``--api``) is not important here because we don't use
Android specific C/C++ API.

The dependent libraries, such as OpenSSL and libev should be built
with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
Expand Down

0 comments on commit a00442b

Please sign in to comment.