diff --git a/codegen/build_def.bzl b/codegen/build_def.bzl index 744f3f666a6..1b56300513e 100644 --- a/codegen/build_def.bzl +++ b/codegen/build_def.bzl @@ -39,5 +39,9 @@ def tflm_inference_library( "//tensorflow/lite/micro:micro_common", "//tensorflow/lite/micro:micro_context", ], + target_compatible_with = select({ + "//conditions:default": [], + "//:with_compression_enabled": ["@platforms//:incompatible"], + }), visibility = visibility, )