diff --git a/tensorflow/lite/build_def.bzl b/tensorflow/lite/build_def.bzl index 9753e9bf35c57a..a6236f98da6f65 100644 --- a/tensorflow/lite/build_def.bzl +++ b/tensorflow/lite/build_def.bzl @@ -24,7 +24,10 @@ def tflite_copts(): "/wd4018", # -Wno-sign-compare ], "//conditions:default": [ + "-Wno-deprecated-declarations", "-Wno-sign-compare", + "-Wno-unused-const-variable", + "-Wno-unused-function", ], }) + select({ clean_dep("//tensorflow:optimized"): ["-O3"], diff --git a/tensorflow/lite/delegates/nnapi/BUILD b/tensorflow/lite/delegates/nnapi/BUILD index aa516543244f1a..180443c8b956c4 100644 --- a/tensorflow/lite/delegates/nnapi/BUILD +++ b/tensorflow/lite/delegates/nnapi/BUILD @@ -26,6 +26,9 @@ cc_library( "nnapi_delegate.h", "nnapi_delegate_kernel.h", ], + copts = [ + "-Wno-unused-private-field", + ], deps = [ "//tensorflow/lite:allocation", "//tensorflow/lite:kernel_api", diff --git a/tensorflow/lite/kernels/internal/BUILD b/tensorflow/lite/kernels/internal/BUILD index 50b936668092ee..f2dc8c91ea3afa 100644 --- a/tensorflow/lite/kernels/internal/BUILD +++ b/tensorflow/lite/kernels/internal/BUILD @@ -565,7 +565,10 @@ cc_library( "optimized/neon_tensor_utils.h", "optimized/neon_tensor_utils_impl.h", ], - copts = NEON_FLAGS_IF_APPLICABLE + HARD_FP_FLAGS_IF_APPLICABLE, + copts = NEON_FLAGS_IF_APPLICABLE + HARD_FP_FLAGS_IF_APPLICABLE + [ + "-Wno-deprecated-declarations", + "-Wno-unused-function", + ], deps = [ ":common", ":compatibility",