Drop i386 support in TFMobile iOS Makefiles

PiperOrigin-RevId: 237811714
This commit is contained in:
Yu-Cheng Ling 2019-03-11 08:57:38 -07:00 committed by TensorFlower Gardener
parent 6af75229f4
commit 2b9900638a
3 changed files with 6 additions and 51 deletions

View File

@ -24,11 +24,11 @@ fi
usage() {
echo "Usage: $(basename "$0") [-a]"
echo "-a [build_arch] build for specified arch comma separate for multiple archs (eg: x86_64,arm64)"
echo "default arch i386, x86_64, armv7, armv7s, arm64"
echo "default arch x86_64, armv7, armv7s, arm64"
exit 1
}
BUILD_TARGET="i386 x86_64 armv7 armv7s arm64"
BUILD_TARGET="x86_64 armv7 armv7s arm64"
while getopts "a:" opt_name; do
case "$opt_name" in
a) BUILD_TARGET="${OPTARG}";;
@ -115,39 +115,6 @@ package_pb_library() {
build_target() {
case "$1" in
i386) make distclean
./configure \
--host=i386-apple-${OSX_VERSION} \
--disable-shared \
--enable-cross-compile \
--with-protoc="${PROTOC_PATH}" \
--prefix=${LIBDIR}/iossim_386 \
--exec-prefix=${LIBDIR}/iossim_386 \
"CFLAGS=${CFLAGS} \
-mios-simulator-version-min=${MIN_SDK_VERSION} \
-arch i386 \
-fembed-bitcode \
-isysroot ${IPHONESIMULATOR_SYSROOT}" \
"CXX=${CXX}" \
"CXXFLAGS=${CXXFLAGS} \
-mios-simulator-version-min=${MIN_SDK_VERSION} \
-arch i386 \
-fembed-bitcode \
-isysroot \
${IPHONESIMULATOR_SYSROOT}" \
LDFLAGS="-arch i386 \
-fembed-bitcode \
-mios-simulator-version-min=${MIN_SDK_VERSION} \
${LDFLAGS} \
-L${IPHONESIMULATOR_SYSROOT}/usr/lib/ \
-L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" \
"LIBS=${LIBS}"
make -j"${JOB_COUNT}"
make install
package_pb_library "iossim_386"
;;
x86_64) make distclean
./configure \
--host=x86_64-apple-${OSX_VERSION} \

View File

@ -46,11 +46,11 @@ fi
usage() {
echo "Usage: $(basename "$0") [-a]"
echo "-a [build_arch] build for specified arch comma separate for multiple archs (eg: x86_64,arm64)"
echo "default is [i386, x86_64, armv7, armv7s, arm64]"
echo "default is [x86_64, armv7, armv7s, arm64]"
exit 1
}
BUILD_TARGET="i386 x86_64 armv7 armv7s arm64"
BUILD_TARGET="x86_64 armv7 armv7s arm64"
while getopts "a:f:h:n:" opt_name; do
case "$opt_name" in
a) BUILD_TARGET="${OPTARG}";;
@ -126,18 +126,6 @@ case "$1" in
fi
package_tf_library "arm64"
;;
i386)
make -j"${JOB_COUNT}" -f tensorflow/contrib/makefile/Makefile \
TARGET=IOS IOS_ARCH=I386 LIB_NAME=${LIB_PREFIX}-i386.a \
OPTFLAGS="${BUILD_OPT}" HOST_NSYNC_LIB="${NSYNC_HOST}" \
TARGET_NSYNC_LIB="${NSYNC_TARGET}"
if [ $? -ne 0 ]
then
echo "i386 compilation failed."
exit 1
fi
package_tf_library "i386"
;;
x86_64)
make -j"${JOB_COUNT}" -f tensorflow/contrib/makefile/Makefile \
TARGET=IOS IOS_ARCH=X86_64 LIB_NAME=${LIB_PREFIX}-x86_64.a \

View File

@ -22,7 +22,7 @@ set -e
prog=compile_nsync.sh
android_api_version=21
default_android_arch=armeabi-v7a
default_ios_arch="i386 x86_64 armv7 armv7s arm64"
default_ios_arch="x86_64 armv7 armv7s arm64"
usage="usage: $prog [-t linux|ios|android|macos|native]
[-a architecture] [-v android_api_version]
@ -130,7 +130,7 @@ for arch in $archs; do
ios) arch_flags=
case "$arch" in
i386|x86_64)
x86_64)
arch_flags="$arch_flags -mios-simulator-version-min=8.0"
arch_flags="$arch_flags -isysroot $(xcrun --sdk iphonesimulator --show-sdk-path)"
;;