blob: 8d4698aaf6a9dd92943c4ca09b249ff2c222ca09 [file] [edit]
# Copyright 2021 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.
import("//build/sdk/sdk_host_tool.gni")
static_library("common") {
public = [ "blobfs-compression.h" ]
sources = [ "common.cc" ]
deps = [ "//src/storage/blobfs" ]
public_deps = [
"//src/lib/chunked-compression",
"//src/storage/blobfs:delivery_blob",
"//zircon/third_party/ulib/safemath",
]
}
executable("blobfs-compression") {
sources = [ "main.cc" ]
deps = [
":common",
"//src/lib/digest",
"//src/lib/fxl:fxl_cli",
"//src/storage/blobfs:delivery_blob",
]
if (!is_fuchsia) {
deps += [ "//zircon/system/public" ]
# https://fxbug.dev/42056285: Optimizing for speed saves a considerable amount of
# time when constructing blobfs images with a large number of blobs.
configs -= [ "//build/config:default_optimize" ]
configs += [ "//build/config:optimize_speed" ]
configs += [ "//build/config/lto:lto-if-compatible" ]
exclude_toolchain_tags = [
# TODO(https://fxbug.dev/42130760): blobfs performs poorly when built with asan
"asan",
# TODO(https://fxbug.dev/42137263): blobfs performs poorly when built with profile
"profile",
# TODO(https://fxbug.dev/42137263): blobfs performs poorly when built with coverage
"coverage",
]
}
}
if (is_host) {
sdk_host_tool("blobfs-compression_sdk") {
category = "partner"
output_name = "blobfs-compression"
deps = [ ":blobfs-compression" ]
}
}
# This group of tests is run in CQ/CI.
# [It is referenced by ../BUILD.gn's "tests".]
group("tests") {
testonly = true
deps = [ "test:tests" ]
}