]> git.saurik.com Git - cycript.git/commitdiff
Fix -g/-O on Android and commit all build scripts.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 02:38:32 +0000 (18:38 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 02:38:32 +0000 (18:38 -0800)
android-push.sh [new file with mode: 0755]
android-xcode.sh [new file with mode: 0755]
android.sh

diff --git a/android-push.sh b/android-push.sh
new file mode 100755 (executable)
index 0000000..95a8e46
--- /dev/null
@@ -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 (executable)
index 0000000..9eeec3e
--- /dev/null
@@ -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"
index d155b1b02321f33342c0e7c4d8c3a50d0931758e..3e8708e7af0bfa2b8729331bf707621ffaa57ee5 100755 (executable)
@@ -19,8 +19,13 @@ cxx=${bin}/${tgt}-g++
 cpp=()
 cpp+=(-fPIE)
 ldf+=(-rdynamic -fPIE -pie)
 cpp=()
 cpp+=(-fPIE)
 ldf+=(-rdynamic -fPIE -pie)
+ccf=()
+ccf+=(-g0 -O3)
 function cfg() {
     cfg=$1
     shift
 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[*]}" "$@"
 }
 }