Use clang for android build
With androideabi-4.9, android build now supports threading.
This commit is contained in:
parent
0e8afdb050
commit
1164e931c5
|
@ -39,8 +39,8 @@ PATH=$TOOLCHAIN/bin:$PATH
|
|||
--without-libxml2 \
|
||||
--disable-python-bindings \
|
||||
--disable-examples \
|
||||
--disable-threads \
|
||||
CC=clang \
|
||||
CXX=clang++ \
|
||||
CPPFLAGS="-I$PREFIX/include" \
|
||||
CXXFLAGS="-fno-strict-aliasing" \
|
||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||
LDFLAGS="-L$PREFIX/lib"
|
||||
|
|
|
@ -224,8 +224,8 @@ LIBS=$LIBS_OLD
|
|||
case "$host" in
|
||||
*android*)
|
||||
android_build=yes
|
||||
# android does not need -pthread, but needs followng 2 libs for C++
|
||||
APPLDFLAGS="$APPLDFLAGS -lstdc++ -lsupc++"
|
||||
# android does not need -pthread, but needs followng 3 libs for C++
|
||||
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
|
||||
;;
|
||||
*)
|
||||
PTHREAD_LDFLAGS="-pthread"
|
||||
|
|
|
@ -21,7 +21,9 @@ unpacked::
|
|||
|
||||
$ build/tools/make-standalone-toolchain.sh \
|
||||
--install-dir=$ANDROID_HOME/toolchain \
|
||||
--toolchain=arm-linux-androideabi-4.8
|
||||
--toolchain=arm-linux-androideabi-4.9 \
|
||||
--llvm-version=3.5 \
|
||||
--platform=android-16
|
||||
|
||||
The additional flag ``--system=linux-x86_64`` may be required if you
|
||||
are using x86_64 system.
|
||||
|
|
Loading…
Reference in New Issue