From b93d4842cc076eb3a26f0c4a6ccb1021354a9dcf Mon Sep 17 00:00:00 2001 From: Tyler Southard Date: Mon, 11 Mar 2019 06:53:49 -0400 Subject: [PATCH 1/2] Add armv7 support for Xamarin.iOS native libraries --- src/csharp/experimental/build_native_ext_for_ios.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/csharp/experimental/build_native_ext_for_ios.sh b/src/csharp/experimental/build_native_ext_for_ios.sh index 69c9cdf021c..130f4c51e96 100755 --- a/src/csharp/experimental/build_native_ext_for_ios.sh +++ b/src/csharp/experimental/build_native_ext_for_ios.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Helper script to crosscompile grpc_csharp_ext native extension for Android. +# Helper script to crosscompile grpc_csharp_ext native extension for iOS. set -ex @@ -28,9 +28,8 @@ function build { PATH_CC="$(xcrun --sdk $SDK --find clang)" PATH_CXX="$(xcrun --sdk $SDK --find clang++)" - # TODO(jtattermusch): add -mios-version-min=6.0 and -Wl,ios_version_min=6.0 - CPPFLAGS="-O2 -Wframe-larger-than=16384 -arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -DPB_NO_PACKED_STRUCTS=1" - LDFLAGS="-arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path)" + CPPFLAGS="-O2 -Wframe-larger-than=16384 -arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -mios-version-min=6.0 -DPB_NO_PACKED_STRUCTS=1" + LDFLAGS="-arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -Wl,ios_version_min=6.0" # TODO(jtattermusch): revisit the build arguments make -j4 static_csharp \ @@ -51,10 +50,12 @@ function fatten { mkdir -p libs/ios lipo -create -output libs/ios/lib$LIB_NAME.a \ + libs/ios_armv7/lib$LIB_NAME.a \ libs/ios_arm64/lib$LIB_NAME.a \ libs/ios_x86_64/lib$LIB_NAME.a } +build iphoneos armv7 build iphoneos arm64 build iphonesimulator x86_64 From 5779e0c9afbc2c228e9132ff43b7ccb309675a80 Mon Sep 17 00:00:00 2001 From: Tyler Southard Date: Mon, 11 Mar 2019 07:11:23 -0400 Subject: [PATCH 2/2] Updated experimental README --- src/csharp/experimental/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/experimental/README.md b/src/csharp/experimental/README.md index 64515075ce0..b5c106e320c 100644 --- a/src/csharp/experimental/README.md +++ b/src/csharp/experimental/README.md @@ -14,7 +14,7 @@ Xamarin.Android `arm64-v8a` (some newer Android devices), `x86` (for emulator) Xamarin.iOS -- supported architectures: arm64 (iPhone 6+) and x86_64 (iPhone simulator) +- supported architectures: armv7, arm64 (iPhone 6+) and x86_64 (iPhone simulator) # Unity