blob: 16d87e3da1d150840c846579659f629ba27c5512 [file] [log] [blame] [edit]
# Copyright 2018 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.
# Definitions to build each of the Fuchsia SDKs.
import("//build/config/build_api_module.gni")
import("//build/dart/toolchain.gni")
import("//build/fidl/toolchain.gni")
import("//build/sdk/config.gni")
import("//build/sdk/generate_final_idk.gni")
import("//build/sdk/merged_sdk.gni")
import("//build/sdk/sdk_collection.gni")
import("//build/sdk/sdk_documentation.gni")
import("//build/sdk/sdk_molecule.gni")
import("//tools/check-licenses/build/license_data.gni")
import("config.gni")
# A list of sdk_collection() targets that determine the content
# if the Fuchsia Core IDK, which provides stable and officially
# supported Fuchsia APIs and ABIs.
_fuchsia_core_idk_deps = [
":core",
":e2e_testing",
]
# A list of non-sdk_collection() targets that will be built with the
# Fuchsia Core IDK archive, for validation purpose. Note that these
# will also be built in the sub-builds launched by generate_final_idk().
_fuchsia_core_idk_validation_deps = []
# Another list of validation targets, these will only be built in the
# top-level build, and should depend on //sdk:final_fuchsia_idk.exported
# directly to validate its content.
_fuchsia_core_idk_final_validation_deps = []
if (host_os == "linux") {
_fuchsia_core_idk_final_validation_deps = [
# Run the Bazel SDK test suite against the final exported directory,
# TODO(fxbug.dev/124321): Make the Bazel SDK test suite runnable on MacOS!
"//build/bazel/bazel_sdk:bazel_sdk_tests_idk",
]
}
# A list of sdk_collection() targets that correspond to all
# IDK targets in the "public" and "partner" category. For now
# this is only the Fuchsia Core IDK, with the exceptional addition
# of //sdk:zircon_sysroot. See the documentation comment for the
# latter to understand why this is needed.
#
# Note that //sdk:zircon_sysroot simply depends on
# //zircon/public/sysroot/sdk:sysroot_sdk which is already
# a transitive dependency of //sdk:core, so technically adding
# this target here only ensures that `fx build sdk` will
# also create $OUTPUT_DIR/sdk/exported/zircon_sysroot/ by
# default, and should not affect other uses of _sdk_public_deps.
_sdk_public_deps = _fuchsia_core_idk_deps + [ ":zircon_sysroot" ]
# This default target should depend on all public or partner IDKs.
group("sdk") {
testonly = true
public_deps = _sdk_public_deps
data_deps = [ ":sdk_source_set_list" ]
deps = [ ":sdk_atom_manifest_goldens($target_toolchain)" ]
}
# This file contains the list of all source files used in sdk_source_set()
# targets reachable from //sdk:sdk. The schema is simply a JSON list, where
# each item is the path to a single source file, relative to the source
# directory. Path are not sorted and appear in order of metadata walk, which
# is unstable.
build_api_module("sdk_source_set_list") {
testonly = true
data_keys = [ "sdk_source_set_sources" ]
deps = _sdk_public_deps
}
# Create generated file for fidldoc to read.
generated_file("all_fidl_sdk_json") {
deps = [ "//sdk/fidl" ]
outputs = [ "$root_build_dir/all_fidl_sdk_json.txt" ]
data_keys = [ "fidl_json" ]
}
# Compatibility testing goldens for SDK publishable FIDLs.
# This is a list of scopes like { src = "", dst = "" } specifying which files
# to copy from the build directory into the source tree.
generated_file("compatibility_testing_goldens") {
testonly = true
deps = [
# Pulls in SDKs containing the FIDLs to generate golden files for
"//sdk",
]
outputs = [ "$root_build_dir/compatibility_testing_goldens.json" ]
output_conversion = "json"
data_keys = [ "compatibility_testing_goldens" ]
}
# Contains the list of all plasa fragment files, which have a dump of the
# public API surfaces.
generated_file("plasa_manifest") {
testonly = true
data_keys = [ "plasa" ]
outputs = [ "$root_build_dir/manifest.plasa.json" ]
output_conversion = "json"
deps = _sdk_public_deps
}
# This target is used by infra builders to build all SDK archives that
# make up the "core" SDK. This is deprecated and will be removed once
# https://fxbug.dev/126262 is fixed.
group("archives") {
testonly = true
public_deps = [
":core_archive",
":e2e_testing_archive",
]
}
# A target used to generate an IDK archive
# that only contains prebuilt binaries for
# a single target_cpu architecture.
#
# This will be replaced by "final_fuchsia_idk"
# defined below once we update our infra
# recipes and builder configurations.
# See https://fxbug.dev/126262
merged_sdk("merged") {
testonly = true
deps = _fuchsia_core_idk_deps
}
# This targets generates a "final" IDK archive
# Note that this is part of the Fuchsia Core IDK.# that contains prebuilt binaries for several
# target_cpu architecture. This is done by
# performing several sub-builds and merging
# the results explicitly.
#
# This will deprecate the :merged target
# above once infra recipes and builder
# configuration have been updated.
# See https://fxbug.dev/126262
generate_final_idk("final_fuchsia_idk") {
output_name = "fuchsia_idk"
sdk_target_labels = _fuchsia_core_idk_deps
validation_target_labels = _fuchsia_core_idk_validation_deps
final_validation_target_labels = _fuchsia_core_idk_final_validation_deps
testonly = true
}
group("tests_no_e2e") {
testonly = true
assert_no_deps = e2e_test_libs
deps = [
"ctf/plasa:tests",
"lib:tests",
]
}
group("tests") {
testonly = true
deps = [
":tests_no_e2e",
# `testing:tests` contains unit tests for sl4f, which depend on sl4f so it
# can't live inside `test_no_e2e`.
"testing:tests",
]
}
sdk_atom("version_history") {
id = "sdk://version_history"
category = "partner"
meta = {
dest = "version_history.json"
source = "version_history.json"
schema = "version_history-22rnd667"
type = "version_history"
}
}
# License/rights related information for the SDK.
sdk_documentation("open_source") {
name = "open_source"
category = "public"
files = []
foreach(file,
[
"AUTHORS",
"LICENSE",
"PATENTS",
]) {
files += [
{
source = "//$file"
dest = file
},
]
}
}
# Licensing information for the 'libc'-style musl library.
sdk_documentation("musl_license") {
name = "musl_license"
category = "public"
files = [
{
source = "//zircon/third_party/ulib/musl/COPYRIGHT"
dest = "COPYRIGHT.musl"
},
]
}
# Build this target to generate a NOTICE file for the SDK.
# Uncomment the next line, build it, then manually copy the output
# to "//tools/check-licenses/assets/sdk/NOTICE.fuchsia"
# TODO(fxbug.dev/102264): Build the NOTICE file automatically during SDK generation.
#
#license_data("sdk_notice_gen") {
# target = "//sdk"
#}
# Notice file for all contents in the Fuchsia SDK.
# TODO(fxbug.dev/102264): Replace this with individual notices for each SDK element.
sdk_documentation("sdk_notice") {
name = "sdk_notice"
category = "public"
files = [
{
source = "//tools/check-licenses/assets/sdk/NOTICE.fuchsia"
dest = "NOTICE.fuchsia"
},
]
}
# License/copyright files for the SDK.
sdk_molecule("license") {
visibility = [ ":*" ]
deps = [
":musl_license",
":open_source",
":sdk_notice",
]
}
# A tiny SDK collection used to export the content of the Zircon sysroot
# This is only needed because several other parts of the Fuchsia build
# depend on $OUTPUT_DIR/sdk/exported/zircon_sysroot/ to be available
# and properly populated, see [1] for all details.
#
# Note that //zircon/public/sysroot/sdk:sysroot_sdk is already
# a transitive dependency of //sdk:core, so using the content of
# $OUTPUT_DIR/sdk/exported/core/ would be equivalent, except that
# this directory is much longer to build (since it contains host tools).
#
# [1] https://cs.opensource.google/search?q=zircon_sysroot&ss=fuchsia%2Ffuchsia
sdk_collection("zircon_sysroot") {
category = "internal"
deps = [ "//zircon/public/sysroot/sdk:sysroot_sdk" ]
# A compressed archive is never needed for this collection, only its
# export directory should be used by Fuchsia team developers.
generate_archive = false
}
# A set of SDK atoms related to developing end-to-end tests.
# Note that this is part of the Fuchsia Core IDK.
sdk_collection("e2e_testing") {
# TODO(fxbug.dev/6128): this id should not be necessary.
id = sdk_id
category = "partner"
api = "manifests/e2e_testing.manifest"
deps = [
":e2e_testing_tools",
"//sdk/testing/sl4f/client:client_sdk($dart_toolchain)",
]
# TODO(https://fxbug.dev/126262): Remove this.
if (build_sdk_archives) {
generate_archive = true
}
}
sdk_molecule("e2e_testing_tools") {
visibility = [ ":*" ]
if (!sdk_no_host_tools) {
deps = [
"//src/performance/trace2json:bin_sdk($host_toolchain)",
"//src/sys/pkg/testing/fake-omaha-client:bin_sdk($host_toolchain)",
]
}
}
# Tools and data used on a 'host' development machine; where host is often
# Linux or Mac OS.
sdk_molecule("host_tools") {
visibility = [ ":*" ]
_host_tools = [
"//tools/fidl/fidlgen_rust:fidlgen_rust_sdk",
"//tools/bindc:bindc_sdk",
"//tools/cmc:cmc_sdk",
"//tools/configc:configc_sdk",
"//tools/fidl/fidlgen_hlcpp:fidlgen_hlcpp_sdk",
"//tools/fidl/fidlgen_cpp:fidlgen_cpp_sdk",
"//tools/sdk-tools/fpublish:fpublish_sdk",
"//tools/sdk-tools/fserve:fserve_sdk",
"//tools/sdk-tools/fssh:fssh_sdk",
"//src/developer/debug/zxdb:zxdb_sdk",
"//src/developer/ffx:bin_sdk",
"//src/developer/ffx/plugins/assembly:sdk",
"//src/developer/ffx/plugins/package:sdk",
"//src/developer/ffx/plugins/product:sdk",
"//src/developer/ffx/plugins/scrutiny:sdk",
"//src/storage/bin/fvm:fvm_sdk",
"//src/storage/tools/blobfs-compression:blobfs-compression_sdk",
"//src/sys/pkg/bin/far:bin_sdk",
"//src/sys/pkg/bin/pm:pm_bin_sdk",
"//tools/bootserver_old:bootserver_sdk",
"//tools/net/device-finder:device-finder_sdk",
"//tools/symbolizer:sdk",
"//tools/fidl/fidlc:fidl-format_sdk",
"//tools/fidl/fidlc:fidlc_sdk",
"//tools/fidlcat:fidlcat_sdk",
"//src/storage/blobfs/tools:blobfs_sdk",
"//zircon/tools/merkleroot:merkleroot_sdk",
"//src/storage/minfs/tools:minfs_sdk",
"//zircon/tools/zbi:zbi_sdk",
"//src/developer/ffx/plugins/emulator:uefi_internal",
# TODO(fxbug.dev/95661): Remove these once the emulators are available independently.
"//src/developer/ffx/plugins/emulator:aemu_internal",
"//src/developer/ffx/plugins/emulator:qemu_internal",
]
_toolchains = []
if (host_os == "linux" && sdk_cross_compile_host_tools) {
_toolchains += [
host_x64_toolchain,
host_arm64_toolchain,
]
} else {
_toolchains = [ host_toolchain ]
}
deps = []
foreach(toolchain, _toolchains) {
foreach(dep, _host_tools) {
deps += [ "$dep($toolchain)" ]
}
}
}
sdk_molecule("core_lib") {
visibility = [ ":*" ]
deps = [
"//sdk/lib/async-loop-testing/cpp:cpp_sdk",
"//sdk/lib/component/incoming/cpp:cpp_sdk",
"//sdk/lib/component/outgoing/cpp:cpp_sdk",
"//sdk/lib/driver/component/cpp:cpp_sdk",
"//sdk/lib/driver/devfs/cpp:cpp_sdk",
"//sdk/lib/driver/testing/cpp:cpp_sdk",
"//sdk/lib/fdio:fdio_sdk",
"//sdk/lib/fidl/cpp:cpp_sdk",
"//sdk/lib/fidl/cpp/wire:wire_sdk",
"//sdk/lib/fidl_driver:fidl_driver_sdk",
"//sdk/lib/fit-promise:fit-promise_sdk",
"//sdk/lib/input_report_reader:input_report_reader_sdk",
"//sdk/lib/inspect",
"//sdk/lib/inspect/service/cpp:cpp_sdk",
"//sdk/lib/magma_client:magma_client_sdk",
"//sdk/lib/magma_common:magma_common_sdk",
"//sdk/lib/media/cpp:cpp_sdk",
"//sdk/lib/stdcompat:stdcompat_sdk",
"//sdk/lib/svc:svc_sdk",
"//sdk/lib/sys/component:realm_builder_shard_sdk",
"//sdk/lib/sys/cpp:cpp_sdk",
"//sdk/lib/sys/inspect/cpp:cpp_sdk",
"//sdk/lib/sys/testing:testing_sdk",
"//sdk/lib/syslog",
"//sdk/lib/syslog/structured_backend:structured_backend_sdk",
"//sdk/lib/trace",
"//sdk/lib/ui/scenic/cpp:cpp_sdk",
"//sdk/lib/vfs/cpp:cpp_sdk",
"//sdk/lib/vulkan",
"//src/devices/bin/driver_runtime:driver_runtime_sdk",
"//src/lib/fidl/cpp:cpp_sdk",
"//src/lib/fidl/cpp:hlcpp_conversion_sdk",
"//src/lib/fidl/cpp:natural_ostream_sdk",
"//zircon/system/ulib/async:async-cpp_sdk",
"//zircon/system/ulib/async:async_sdk",
"//zircon/system/ulib/async-default:async-default_sdk",
"//zircon/system/ulib/async-loop:async-loop-cpp_sdk",
"//zircon/system/ulib/async-loop:async-loop-default_sdk",
"//zircon/system/ulib/async-loop:async-loop_sdk",
"//zircon/system/ulib/inspect:inspect_sdk",
"//zircon/system/ulib/sync:sync_sdk",
"//zircon/system/ulib/syslog:syslog_sdk",
"//zircon/system/ulib/trace:trace_sdk",
"//zircon/system/ulib/trace-engine:trace-engine_sdk",
"//zircon/system/ulib/trace-provider:trace-provider-so_sdk",
]
}
# Pieces of the IDK sans host tools (which are in ":host_tools").
sdk_molecule("core_deps") {
visibility = [ ":*" ]
deps = [
":core_lib",
":license",
":version_history",
"devices",
"docs",
"//sdk/fidl",
"//sdk/lib/async-loop-testing/cpp:cpp_sdk",
"//sdk/lib/sys/component/cpp/testing:cpp_library_sdk",
"//sdk/lib/sys/cpp/testing:cpp_sdk",
"//sdk/lib/ui/scenic/cpp/testing:testing_sdk",
"//src/developer/ffx/lib/symbol-index:symbol-index-sdk",
"//src/lib/vulkan:vulkan_layers",
"//third_party/Vulkan-Loader:libvulkan_sdk",
"//third_party/Vulkan-Loader:vulkan_license",
"//zircon/public/sysroot/sdk:sysroot_sdk",
"//zircon/system/ulib/async-testing:async-testing_sdk",
]
if (!sdk_no_host_tools) {
# This target depends on //sdk:host_tools.all($host_toolchain) indirectly.
deps += [ "//tools/docsgen:ref_docs_sdk" ]
}
}
sdk_molecule("core_packages") {
visibility = [ ":*" ]
deps = [ "//src/lib/fuchsia-component-test/realm_builder_server:realm_builder_server_sdk" ]
}
sdk_molecule("platform_fidls") {
visibility = [ ":*" ]
deps = [
"//sdk/fidl/fuchsia.debugger:fuchsia.debugger_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.exception:fuchsia.exception_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_sdk($fidl_toolchain)",
]
}
# This SDK molecule is a collection of libraries only available to the in-tree
# Bazel build. See //sdk:platform.
sdk_molecule("platform_libs") {
visibility = [ ":*" ]
deps = [
":version_history",
"//sdk/lib/syslog/cpp:backend_fuchsia_lib_sdk",
"//src/developer/debug/ipc:ipc_sdk",
"//src/developer/debug/shared:shared_sdk",
"//src/lib/containers/cpp:cpp_sdk",
"//src/lib/diagnostics/accessor2logger:accessor2logger_sdk",
"//src/lib/elflib:elflib_sdk",
"//src/lib/fxl:fxl_sdk",
"//src/lib/process:process_sdk",
"//third_party/re2:re2_sdk",
"//zircon/public/sysroot/sdk:sysroot_sdk",
]
}
# A collection of SDK atoms used to populate the @internal_sdk Bazel
# repository. Only used for the GN > Bazel migration of the build system.
# Content are bound to change a lot. Nothing else should rely on this.
# See https://fxrev.dev/737558 and https://fxbug.dev/113063.
sdk_collection("platform") {
id = sdk_id
category = "internal"
deps = [
":platform_fidls",
":platform_libs",
]
}
# A collection of SDK atoms exposing the stable and officially supported APIs
# and ABI of the "core" Fuchsia platform.
# Due to limitations of the build system at the GN/Bazel boundary, this
# collection cannot contain testonly atoms. Libraries and packages for use in
# tests absolutely belong in the IDK, but unfortunately, before they can be
# added, the `testonly` attribute must be removed.
#
# This collection is part of the Fuchsia Core IDK, as well as used to populate
# the @fuchsia_sdk Bazel repository used internally by the build.
sdk_collection("core") {
id = sdk_id
category = "partner"
api = "manifests/core.manifest"
filter_api_host_tools = !sdk_cross_compile_host_tools
deps = [
":core_deps",
":core_packages",
]
if (!sdk_no_host_tools) {
deps += [ ":host_tools" ]
}
# TODO(https://fxbug.dev/126262): Remove this.
if (build_sdk_archives) {
generate_archive = true
}
}
group("host_tools.all") {
public_deps = []
if (host_os == "linux" && sdk_cross_compile_host_tools) {
public_deps += [
":host_tools.internal($host_arm64_toolchain)",
":host_tools.internal($host_x64_toolchain)",
]
} else {
public_deps += [ ":host_tools.internal($host_toolchain)" ]
}
}
if (is_host) {
# A collection that only contains host tools that are used by the
# Fuchsia build system itself. In particular, this is where
# `ffx` will pick companion host tools when running in-tree.
sdk_collection("host_tools.internal") {
id = sdk_id
category = "partner"
api = "manifests/host_tools_${current_os}_${current_cpu}.manifest"
deps = [
"//src/developer/debug/zxdb:zxdb_sdk",
"//src/developer/ffx:bin_sdk",
"//src/storage/bin/fvm:fvm_sdk",
"//src/storage/blobfs/tools:blobfs_sdk",
"//src/storage/minfs/tools:minfs_sdk",
"//src/storage/tools/blobfs-compression:blobfs-compression_sdk",
"//src/sys/pkg/bin/far:bin_sdk",
"//src/sys/pkg/bin/pm:pm_bin_sdk",
"//tools/bootserver_old:bootserver_sdk",
"//tools/cmc:cmc_sdk",
"//tools/fidl/fidlc:fidl-format_sdk",
"//tools/fidl/fidlc:fidlc_sdk",
"//tools/fidl/fidlgen_hlcpp:fidlgen_hlcpp_sdk",
"//tools/fidlcat:fidlcat_sdk",
"//tools/net/device-finder:device-finder_sdk",
"//tools/symbolizer:sdk",
"//zircon/tools/merkleroot:merkleroot_sdk",
"//zircon/tools/zbi:zbi_sdk",
]
}
}
# Firmware IDK. See /src/firmware/README.md
sdk_collection("firmware") {
category = "experimental"
deps = [
"//sdk/docs:firmware",
"//sdk/lib/zbi-format:zbi-format_sdk",
"//src/firmware/lib/abr:abr_sdk",
"//src/firmware/lib/storage:storage_sdk",
"//src/firmware/lib/zbi:zbi_sdk",
"//src/firmware/lib/zircon_boot:zircon_boot_sdk",
"//third_party/android/platform/external/avb:avb_sdk",
"//zircon/public/sysroot/sdk:sysroot_sdk",
]
# An archive is always needed when building this target.
generate_archive = true
}
# Tools Fuchsia driver developers used on the host platform; where host is often
# Linux or Mac OS.
# WARNING (fxbug.dev/116642): the driver SDK will soon be removed.
# DO NOT ADD anything here!
sdk_molecule("driver_host_tools") {
visibility = [ ":*" ]
_driver_host_tools = [
"//src/devices/tools/fidlgen_banjo:fidlgen_banjo_bin_sdk",
"//tools/bindc:bindc_sdk",
"//tools/fidl/fidlgen_cpp:fidlgen_cpp_sdk",
# TODO(fxbug.dev/80525): Change to "fidlgen_cpp" once Bazel SDK uses the non-experimental name.
"//tools/fidl/fidlgen_cpp:fidlgen_cpp_experimental_driver_only_toolchain_sdk",
]
if (host_os == "linux" && sdk_cross_compile_host_tools) {
_toolchains = [
host_x64_toolchain,
host_arm64_toolchain,
]
} else {
_toolchains = [ host_toolchain ]
}
deps = []
foreach(toolchain, _toolchains) {
foreach(dep, _driver_host_tools) {
deps += [ "$dep($toolchain)" ]
}
}
}
# WARNING (fxbug.dev/116642): the driver SDK will soon be removed.
# DO NOT ADD anything here!
sdk_molecule("bind") {
visibility = [ ":*" ]
deps = [
"//src/devices/bind/fuchsia:fuchsia_sdk",
"//src/devices/bind/fuchsia.acpi:fuchsia.acpi_sdk",
"//src/devices/bind/fuchsia.i2c:fuchsia.i2c_sdk",
"//src/devices/bind/fuchsia.pci:fuchsia.pci_sdk",
"//src/devices/bind/fuchsia.test:fuchsia.test_sdk",
"//src/devices/bind/fuchsia.usb:fuchsia.usb_sdk",
]
}
# WARNING (fxbug.dev/116642): the driver SDK will soon be removed.
# DO NOT ADD anything here!
sdk_molecule("driver_fidl") {
visibility = [ ":*" ]
deps = [
"//sdk/fidl/fuchsia.device.fs:fuchsia.device.fs_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hardware.pci:fuchsia.hardware.pci_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.ieee80211:fuchsia.wlan.ieee80211_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.phyimpl:fuchsia.wlan.phyimpl_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.softmac:fuchsia.wlan.softmac_sdk($fidl_toolchain)",
]
}
# An SDK collection providing SDK atoms used for driver development.
# Their API/ABI is not stable at all. Note: this cannot contain
# testonly atoms.
sdk_collection("driver") {
id = sdk_id
category = "experimental"
api = "manifests/driver.manifest"
filter_api_host_tools = !sdk_cross_compile_host_tools
deps = [
":bind",
":driver_fidl",
"//sdk/lib/component/incoming/cpp:cpp_sdk",
"//sdk/lib/component/outgoing/cpp:cpp_sdk",
"//sdk/lib/driver/component:driver_component",
"//sdk/lib/driver/component/cpp:cpp_sdk",
"//sdk/lib/driver/devfs/cpp:cpp_sdk",
"//sdk/lib/driver/runtime:driver_runtime_cpp_sdk",
"//sdk/lib/driver/runtime:driver_runtime_sdk",
"//sdk/lib/fidl/cpp/wire:wire_sdk",
"//sdk/lib/fidl_driver:fidl_driver_natural_sdk",
"//sdk/lib/fidl_driver:fidl_driver_sdk",
"//sdk/lib/input_report_reader:input_report_reader_sdk",
"//sdk/lib/inspect/component/cpp:inspect_component_cpp_sdk",
"//src/devices/bin/driver_runtime:driver_runtime_sdk",
"//src/devices/lib/mmio:mmio_sdk",
"//src/lib/fidl/cpp:cpp_sdk",
"//zircon/system/ulib/hwreg:hwreg_sdk_sdk",
]
if (!sdk_no_host_tools) {
deps += [ ":driver_host_tools" ]
}
if (build_sdk_archives) {
# TODO(fxbug.dev/116642): the driver SDK archive will soon be removed.
generate_archive = true
}
}
action("get_atoms_from_sdk_manifest") {
testonly = true
deps = []
inputs = []
outputs = []
sdk_manifests = []
foreach(dep, _sdk_public_deps) {
name = get_label_info(dep, "name")
copy_dep = dep + "_final_manifest"
foreach(output, get_target_outputs(copy_dep)) {
sdk_manifests += [ rebase_path(output, root_build_dir) ]
inputs += [ output ]
}
deps += [ copy_dep ]
outputs += [ "$target_gen_dir/$name" ]
}
script = "//sdk/ctf/build/scripts/get_atoms_from_sdk_manifest.py"
args = [ "--sdk_manifests" ]
args += sdk_manifests
args += [
"--output_path",
rebase_path(target_gen_dir, root_build_dir),
]
}
golden_files("sdk_atom_manifest_goldens") {
testonly = true
comparisons = []
sdk_manifests = get_target_outputs(":get_atoms_from_sdk_manifest")
foreach(manifest, sdk_manifests) {
name = get_path_info(manifest, "name")
comparisons += [
{
golden = "//sdk/manifests/atoms/${name}.golden"
candidate = manifest
},
]
}
deps = [ ":get_atoms_from_sdk_manifest($target_toolchain)" ]
}
# These markers are used to define dependencies on FIDL bindings
# so host tools can assert_no_deps to make sure all host tools
# in the SDK are only using FIDL libraries included in the SDK.
group("marker-cts") {
}
group("marker-excluded") {
}
group("marker-experimental") {
}
group("marker-internal") {
}
group("marker-unknown") {
}
group("marker-partner") {
}
group("marker-partner_internal") {
}
group("marker-public") {
}
# Marker for the allow list for use in a subtool.
group("marker-allowed-for-ffx-subtool") {
}