Skip building TF_AcquireFlexDelegate() on Android

The function is needed to support Flex delegate on Python API.
Since Android doesn't need it and some NDK tool has a build error on this,
we'd better skip this on Android.

This CL fixes #42744 issue.

PiperOrigin-RevId: 331677690
Change-Id: I84587c7e6a7e40992d55f59c73b45a6d332bc8f0
This commit is contained in:
Terry Heo 2020-09-14 19:00:24 -07:00 committed by TensorFlower Gardener
parent bf41b29b64
commit 888826695e

View File

@ -145,6 +145,7 @@ TfLiteStatus FlexDelegate::CopyFromBufferHandle(
// Exported C interface function which is used by AcquireFlexDelegate() at
// interpreter_build.cc. To export the function name globally, the function name
// must be matched with patterns in tf_version_script.lds
#if !defined(__ANDROID__)
extern "C" {
#if defined(_WIN32)
__declspec(dllexport)
@ -153,3 +154,4 @@ __declspec(dllexport)
return tflite::FlexDelegate::Create();
}
} // extern "C"
#endif // !defined(__ANDROID__)