* Use -fPIC build flag for tflite only
Instead of global setting, use -fPIC build flag for tenroflow lite only
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Specify to build tensorflow lite library static
"-mfpu=neon-vfpv4"
"-funsafe-math-optimizations"
"-ftree-vectorize"
- "-fPIC"
)
# remove warning from arm cl
list(APPEND TFLITE_INCLUDES "${NDK_DIR}")
endif()
-add_library(tensorflow-lite ${TFLITE_SRCS})
+add_library(tensorflow-lite STATIC ${TFLITE_SRCS})
target_include_directories(tensorflow-lite SYSTEM PUBLIC ${TFLITE_INCLUDES})
target_compile_definitions(tensorflow-lite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK")
+target_compile_options(tensorflow-lite PRIVATE -fPIC)
if(BUILD_TFLITE_BENCHMARK_MODEL)
target_compile_definitions(tensorflow-lite PUBLIC "TFLITE_PROFILING_ENABLED")
endif()