From: Jay Freeman (saurik) Date: Sun, 3 Jan 2016 02:38:32 +0000 (-0800) Subject: Fix -g/-O on Android and commit all build scripts. X-Git-Tag: v0.9.590~88 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/b76dcdd73c5d75767d2ed21cc23aed5a6ac997d3?ds=sidebyside Fix -g/-O on Android and commit all build scripts. --- diff --git a/android-push.sh b/android-push.sh new file mode 100755 index 0000000..95a8e46 --- /dev/null +++ b/android-push.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +for file in .libs/cycript .libs/libcycript.so libcycript.jar libcycript.db ../libcycript.cy; do + adb push build.and-armeabi/"${file}" /data/local/tmp/ +done diff --git a/android-xcode.sh b/android-xcode.sh new file mode 100755 index 0000000..9eeec3e --- /dev/null +++ b/android-xcode.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# XXX: this script is required because, despite claiming clang is so awesome due to having libclang, Google doesn't ship a usable version +xcs=$(xcode-select --print-path) +xct="${xcs}/Toolchains/XcodeDefault.xctoolchain/usr/lib" +./android-configure.sh --with-libclang="-rpath ${xct} ${xct}/libclang.dylib" diff --git a/android.sh b/android.sh index d155b1b..3e8708e 100755 --- a/android.sh +++ b/android.sh @@ -19,8 +19,13 @@ cxx=${bin}/${tgt}-g++ cpp=() cpp+=(-fPIE) ldf+=(-rdynamic -fPIE -pie) +ccf=() +ccf+=(-g0 -O3) function cfg() { cfg=$1 shift - CC="${cc} ${flg[*]}" CXX="${cxx} ${flg[*]}" OBJCXX="${cxx} ${flg[*]}" "${cfg}" --host="${tgt}" CPPFLAGS="${cpp[*]}" LDFLAGS="${ldf[*]}" "$@" + "${cfg}" \ + CC="${cc} ${flg[*]}" CXX="${cxx} ${flg[*]}" OBJCXX="${cxx} ${flg[*]}" \ + CFLAGS="${ccf[*]}" CXXFLAGS="${ccf[*]}" OBJCXXFLAGS="${ccf[*]}" \ + --host="${tgt}" CPPFLAGS="${cpp[*]}" LDFLAGS="${ldf[*]}" "$@" }