contrib/lite: avoid building benchmark_model in build_ios_universal_lib.sh (#17796)
authorCédric Deltheil <355031+deltheil@users.noreply.github.com>
Thu, 5 Apr 2018 23:56:20 +0000 (01:56 +0200)
committerAndrew Harp <andrewharp@users.noreply.github.com>
Thu, 5 Apr 2018 23:56:20 +0000 (19:56 -0400)
It is not needed part of this script. In addition, since f0633ec benchmark_model
now depends on //tensorflow/core library which is not taken into account by the
Makefile from contrib/lite, and thus causes failure:

$ ./build_ios_universal_lib.sh
...
In file included from tensorflow/contrib/lite/tools/benchmark_model.cc:29:
In file included from ./tensorflow/core/platform/env.h:24:
In file included from ./tensorflow/core/lib/core/errors.h:21:
./tensorflow/core/lib/core/status.h:23:10: fatal error: 'tensorflow/core/lib/core/error_codes.pb.h' file not found
#include "tensorflow/core/lib/core/error_codes.pb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

tensorflow/contrib/lite/build_ios_universal_lib.sh

index 4a9023f..9f398f4 100755 (executable)
@@ -19,11 +19,16 @@ set -e
 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 cd "$SCRIPT_DIR/../../.."
 
-make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=x86_64 -j 8
-make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=i386 -j 8
-make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=armv7 -j 8
-make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=armv7s -j 8
-make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=arm64 -j 8
+make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=x86_64 -j 8 \
+$SCRIPT_DIR/gen/lib/ios_x86_64/libtensorflow-lite.a
+make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=i386 -j 8 \
+$SCRIPT_DIR/gen/lib/ios_i386/libtensorflow-lite.a
+make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=armv7 -j 8 \
+$SCRIPT_DIR/gen/lib/ios_armv7/libtensorflow-lite.a
+make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=armv7s -j 8 \
+$SCRIPT_DIR/gen/lib/ios_armv7s/libtensorflow-lite.a
+make -f tensorflow/contrib/lite/Makefile TARGET=IOS IOS_ARCH=arm64 -j 8 \
+$SCRIPT_DIR/gen/lib/ios_arm64/libtensorflow-lite.a
 
 lipo \
 tensorflow/contrib/lite/gen/lib/ios_x86_64/libtensorflow-lite.a \