blob: d8267c3824d6f84cc018ef2e46727ba887b014c2 [file]
# Copyright 2026 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load(
"//build/bazel/rules/components:fx_component.bzl",
"fx_component",
"fx_component_manifest",
)
load("//build/bazel/rules/packages:fx_packaged_binary.bzl", "fx_packaged_binary")
load("//build/bazel/rules/rust:rustc_binary.bzl", "rustc_binary")
package(default_applicable_licenses = ["//:license"])
rustc_binary(
name = "bin",
testonly = True,
srcs = ["src/main.rs"],
build_flags = ["//build/config/rust/lints:deny_unused_results"],
crate_name = "starnix_kernel_core_bench",
edition = "2024",
tags = ["manual"],
deps = [
"//sdk/rust/zx",
"//src/developer/fuchsia-criterion",
"//src/lib/fuchsia-runtime",
"//src/starnix/kernel/core",
],
)
fx_packaged_binary(
name = "bin_packaged",
testonly = True,
binary = ":bin",
binary_name = "starnix_kernel_core_bench",
)
fx_component_manifest(
name = "component_manifest",
testonly = True,
component_name = "starnix_kernel_core_bench",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/benchmarks.cml",
visibility = ["//visibility:private"],
)
fx_component(
name = "component",
testonly = True,
compiled_manifest = ":component_manifest",
visibility = ["//visibility:private"],
deps = [":bin_packaged"],
)