2 function run
{ sdk
=$1; arch
=$2; shift 2; xcrun
--sdk "${sdk}" g
++ -arch "${arch}" "$@" -o a \
3 -isysroot "$(xcodebuild -sdk "${sdk}" -version Path)" \
4 -x c
<(echo "void CYListenServer(short port); int main() { CYListenServer(6667); return 0; }") \
5 -framework Foundation
-framework JavaScriptCore
-framework Cycript
; }
7 run macosx i386
-mmacosx-version-min=10.6 -F Cycript.osx
"${flags[@]}"
8 run macosx x86_64
-mmacosx-version-min=10.6 -F Cycript.osx
"${flags[@]}"
10 run iphoneos armv6
-miphoneos-version-min=4.0 -F Cycript.ios
"${flags[@]}"
11 run iphoneos arm64
-miphoneos-version-min=7.0 -F Cycript.ios
"${flags[@]}"
13 run iphonesimulator i386
-mios-simulator-version-min=4.0 -F Cycript.ios
"${flags[@]}"
14 run iphonesimulator x86_64
-mios-simulator-version-min=4.0 -F Cycript.ios
"${flags[@]}" -fobjc-abi-version=2 -fobjc-legacy-dispatch