load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("//tensorflow/lite/ios:ios.bzl", "TFL_MINIMUM_OS_VERSION")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_static_framework")

package(
    licenses = ["notice"],  # Apache 2.0
)

# Main target for the benchmark tool iOS framework.
# bazel build --config=ios_fat -c opt //tensorflow/lite/tools/benchmark/experimental/ios:TensorFlowLiteBenchmarkC_framework
ios_static_framework(
    name = "TensorFlowLiteBenchmarkC_framework",
    hdrs = [
        "//tensorflow/lite/tools:logging.h",
        "//tensorflow/lite/tools/benchmark/experimental/c:benchmark_c_api.h",
        "//tensorflow/lite/tools/benchmark/experimental/c:c_api_types.h",
    ],
    bundle_name = "TensorFlowLiteBenchmarkC",
    minimum_os_version = TFL_MINIMUM_OS_VERSION,
    deps = [
        "//tensorflow/lite/tools/benchmark/experimental/c:benchmark_c_api",
    ],
)

# Used for building TensorFlowLiteBenchmarkC_framework framework.
build_test(
    name = "framework_build_test",
    tags = [
        "nomsan",  # b/145205324
        "notsan",  # b/145205324
    ],
    targets = [
        ":TensorFlowLiteBenchmarkC_framework",
    ],
)
