Skip to content

Commit 51694e2

Browse files
committed
Fix builds for TensorFlow Lite on Mac and Windows
1 parent e1565dc commit 51694e2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tensorflow-lite/cppbuild.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ sedinplace '/#include <math.h>/a\
3535
sedinplace "s/TFLITE_VERSION_STRING/\"$TENSORFLOW_VERSION\"/g" tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/core/c/c_api.cc
3636
sedinplace "s/TFLITE_EXTENSION_APIS_VERSION_STRING/\"$TENSORFLOW_VERSION\"/g" tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/core/c/c_api.cc
3737
sedinplace '/private:/d' tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/core/model_building.h
38+
sedinplace '/core\/example/d' tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/CMakeLists.txt
3839
sedinplace "s:TENSORFLOW_SOURCE_DIR \"\":TENSORFLOW_SOURCE_DIR \"$PWD/tensorflow-$TENSORFLOW_VERSION\":g" tensorflow-$TENSORFLOW_VERSION/tensorflow/lite/CMakeLists.txt
3940

41+
4042
if [[ ! "$PLATFORM" == windows* ]]; then
4143
mkdir -p build_flatc
4244
cd build_flatc
@@ -123,6 +125,7 @@ sedinplace '/CMakeCCompilerId.o/d' objs
123125
sedinplace '/CMakeCXXCompilerId.o/d' objs
124126
sedinplace '/tensorflowlite_c.dir/d' objs
125127
sedinplace '/tensorflow_profiler_logger/d' objs
128+
sedinplace '/xnnpack-operator-delete.dir/d' objs
126129
# convert to DOS paths with short names to prevent exceeding MAX_PATH on Windows
127130
if which cygpath; then
128131
cygpath -d -f objs > objs.dos

0 commit comments

Comments
 (0)