summaryrefslogtreecommitdiff
path: root/deps/uv/android-configure-x86
blob: a149715f37547f03829614e3ca6c1f42795a7737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

export TOOLCHAIN=$PWD/android-toolchain-x86
mkdir -p $TOOLCHAIN
API=${3:-24}
$1/build/tools/make-standalone-toolchain.sh \
    --toolchain=x86-4.9 \
    --arch=x86 \
    --install-dir=$TOOLCHAIN \
    --platform=android-$API \
    --force
export PATH=$TOOLCHAIN/bin:$PATH
export AR=i686-linux-android-ar
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LINK=i686-linux-android-g++
export PLATFORM=android
export CFLAGS="-D__ANDROID_API__=$API"

if [[ $2 == 'gyp' ]]
  then
    ./gyp_uv.py -Dtarget_arch=x86 -DOS=android -f make-android
fi