build: proper support for android cross compilation
The build script needs to properly specify the target as android so the gyp build scripts can properly leverage cross compilation using the android NDK. PR-URL: https://github.com/libuv/libuv/pull/433 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
5df06b3f2e
commit
d57c7e685f
@ -6,7 +6,7 @@ $1/build/tools/make-standalone-toolchain.sh \
|
||||
--toolchain=arm-linux-androideabi-4.8 \
|
||||
--arch=arm \
|
||||
--install-dir=$TOOLCHAIN \
|
||||
--platform=android-9
|
||||
--platform=android-21
|
||||
export PATH=$TOOLCHAIN/bin:$PATH
|
||||
export AR=arm-linux-androideabi-ar
|
||||
export CC=arm-linux-androideabi-gcc
|
||||
@ -16,5 +16,5 @@ export PLATFORM=android
|
||||
|
||||
if [ $2 -a $2 == 'gyp' ]
|
||||
then
|
||||
./gyp_uv.py -Dtarget_arch=arm -DOS=android
|
||||
./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android
|
||||
fi
|
||||
|
||||
@ -35,7 +35,13 @@
|
||||
'xcode_settings': {
|
||||
'GCC_OPTIMIZATION_LEVEL': '0',
|
||||
'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ],
|
||||
}
|
||||
},
|
||||
'conditions': [
|
||||
['OS == "android"', {
|
||||
'cflags': [ '-fPIE' ],
|
||||
'ldflags': [ '-fPIE', '-pie' ]
|
||||
}]
|
||||
]
|
||||
},
|
||||
'Release': {
|
||||
'defines': [ 'NDEBUG' ],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user