forked from libuv/libuv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add compile for android arm64/x86/x86-64
Add compile options for Android arm64/x86/x86-64 and update the instructions in README.md. PR-URL: libuv#1934 Reviewed-By: Ben Noordhuis <[email protected]>
- Loading branch information
1 parent
153ea11
commit baa8146
Showing
5 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
export TOOLCHAIN=$PWD/android-toolchain-arm64 | ||
mkdir -p $TOOLCHAIN | ||
API=${3:-24} | ||
$1/build/tools/make-standalone-toolchain.sh \ | ||
--toolchain=aarch64-linux-android-4.9 \ | ||
--arch=arm64 \ | ||
--install-dir=$TOOLCHAIN \ | ||
--platform=android-$API \ | ||
--force | ||
export PATH=$TOOLCHAIN/bin:$PATH | ||
export AR=aarch64-linux-android-ar | ||
export CC=aarch64-linux-android-gcc | ||
export CXX=aarch64-linux-android-g++ | ||
export LINK=aarch64-linux-android-g++ | ||
export PLATFORM=android | ||
export CFLAGS="-D__ANDROID_API__=$API" | ||
|
||
if [[ $2 == 'gyp' ]] | ||
then | ||
./gyp_uv.py -Dtarget_arch=arm64 -DOS=android -f make-android | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
export TOOLCHAIN=$PWD/android-toolchain-x86_64 | ||
mkdir -p $TOOLCHAIN | ||
API=${3:-24} | ||
$1/build/tools/make-standalone-toolchain.sh \ | ||
--toolchain=x86_64-4.9 \ | ||
--arch=x86_64 \ | ||
--install-dir=$TOOLCHAIN \ | ||
--platform=android-$API \ | ||
--force | ||
export PATH=$TOOLCHAIN/bin:$PATH | ||
export AR=x86_64-linux-android-ar | ||
export CC=x86_64-linux-android-gcc | ||
export CXX=x86_64-linux-android-g++ | ||
export LINK=x86_64-linux-android-g++ | ||
export PLATFORM=android | ||
export CFLAGS="-D__ANDROID_API__=$API -fPIC" | ||
export CXXFLAGS="-D__ANDROID_API__=$API -fPIC" | ||
export LDFLAGS="-fPIC" | ||
|
||
if [[ $2 == 'gyp' ]] | ||
then | ||
./gyp_uv.py -Dtarget_arch=x86_64 -DOS=android -f make-android | ||
fi |