Squashed 'third_party/mason/' changes from 6b4c359..c7a9670

git-subtree-dir: third_party/mason
git-subtree-split: c7a967003a7113a17faafe3b41082ad1ae3f1c2f
This commit is contained in:
Daniel J. Hofmann
2017-02-15 11:48:43 +01:00
parent 6f27aae022
commit ce1141982b
155 changed files with 3916 additions and 336 deletions
@@ -1,10 +1,5 @@
language: cpp
sudo: false
os:
- linux
- osx
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
+7 -41
View File
@@ -1,47 +1,13 @@
#!/usr/bin/env bash
MASON_NAME=android-ndk
MASON_VERSION=x86-9-r13b
MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}"))
MASON_LIB_FILE=
. ${MASON_DIR}/mason.sh
export MASON_ANDROID_TOOLCHAIN="i686-linux-android"
export MASON_CFLAGS="-target i686-none-linux-android"
export MASON_LDFLAGS=""
export MASON_ANDROID_ABI="x86"
export MASON_ANDROID_NDK_ARCH="x86"
function mason_load_source {
if [ ${MASON_PLATFORM} = 'osx' ]; then
mason_download \
http://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip \
b822dd239f63cd2e1e72c823c41bd732da2e5ad6
elif [ ${MASON_PLATFORM} = 'linux' ]; then
mason_download \
http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip \
b95dd1fba5096ca3310a67e90b2a5a8aca3ddec7
fi
mason_setup_build_dir
rm -rf ./android-ndk-r13b
unzip -q ../.cache/${MASON_SLUG} $@
export MASON_BUILD_PATH=${MASON_ROOT}/.build/android-ndk-r13b
}
function mason_compile {
rm -rf ${MASON_PREFIX}
mkdir -p ${MASON_PREFIX}
${MASON_BUILD_PATH}/build/tools/make_standalone_toolchain.py \
--force \
--arch x86 \
--api 9 \
--stl libc++ \
--install-dir "${MASON_PREFIX}"
# NDK r12 ships with .so files which are preferred when linking, but cause
# errors on devices when it's not present.
find "${MASON_PREFIX}" -name "libstdc++.so" -delete
}
function mason_clean {
make clean
}
mason_run "$@"
. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh