Use clang for android build

With androideabi-4.9, android build now supports threading.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-11 18:48:31 +09:00
parent 0e8afdb050
commit 1164e931c5
3 changed files with 7 additions and 5 deletions

View File

@ -39,8 +39,8 @@ PATH=$TOOLCHAIN/bin:$PATH
--without-libxml2 \ --without-libxml2 \
--disable-python-bindings \ --disable-python-bindings \
--disable-examples \ --disable-examples \
--disable-threads \ CC=clang \
CXX=clang++ \
CPPFLAGS="-I$PREFIX/include" \ CPPFLAGS="-I$PREFIX/include" \
CXXFLAGS="-fno-strict-aliasing" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-L$PREFIX/lib" LDFLAGS="-L$PREFIX/lib"

View File

@ -224,8 +224,8 @@ LIBS=$LIBS_OLD
case "$host" in case "$host" in
*android*) *android*)
android_build=yes android_build=yes
# android does not need -pthread, but needs followng 2 libs for C++ # android does not need -pthread, but needs followng 3 libs for C++
APPLDFLAGS="$APPLDFLAGS -lstdc++ -lsupc++" APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
;; ;;
*) *)
PTHREAD_LDFLAGS="-pthread" PTHREAD_LDFLAGS="-pthread"

View File

@ -21,7 +21,9 @@ unpacked::
$ build/tools/make-standalone-toolchain.sh \ $ build/tools/make-standalone-toolchain.sh \
--install-dir=$ANDROID_HOME/toolchain \ --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 The additional flag ``--system=linux-x86_64`` may be required if you
are using x86_64 system. are using x86_64 system.