| # Copyright 2025 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/bazel_idk:defs.bzl", "idk_host_molecule", "idk_molecule") |
| |
| # All atoms to be produced by the main build configuration for inclusion in the Fuchsia IDK. |
| # For now, there is no distinction between the in-tree IDK and real Fuchsia IDK. |
| # For now, this contains atoms that may also need to be built in other configurations |
| idk_molecule( |
| name = "fuchsia_idk_atoms_produced_by_main_platform_build", |
| visibility = [ |
| "//build/bazel/bazel_idk/tests:__subpackages__", |
| ], |
| deps = [ |
| ":cc_source_libraries", |
| "//sdk/fidl", |
| ] + [ |
| ":build_host_tools", |
| ":non_build_host_tools", |
| ], |
| ) |
| |
| # C/C++ code that is provided as source in the IDK. |
| # Prefer providing source code if all dependencies are available in the IDK. |
| # All source files must be buildable at each supported API level. |
| # There is currently no mechanism to ensure this, even at "PLATFORM" because |
| # this target does not cause the source files to be compiled. It only generates |
| # the SDK atoms TODO(https://fxbug.dev/42083950): Ensure the libraries build and |
| # are complete at all API levels. |
| idk_molecule( |
| name = "cc_source_libraries", |
| deps = [ |
| "//sdk/lib/fit:fit_idk", |
| "//sdk/lib/fit-promise:fit-promise_idk", |
| "//sdk/lib/magma_common:magma_common_idk", |
| "//sdk/lib/media/cpp:no_converters_idk", |
| "//sdk/lib/memory_barriers:memory_barriers_idk", |
| "//sdk/lib/stdcompat:stdcompat_idk", |
| "//sdk/lib/utf-utils:utf-utils_idk", |
| "//zircon/system/ulib/zx:zx_idk", |
| ], |
| ) |
| |
| # Tools and data used on a host development machine to build software to run |
| # on Fuchsia. |
| idk_host_molecule( |
| name = "build_host_tools", |
| deps = [ |
| "//tools/fidl/fidlc:fidl-format_idk", |
| "//tools/fidl/fidlc:fidlc_idk", |
| "//tools/fidl/fidlgen_cpp:fidlgen_cpp_idk", |
| "//tools/fidl/fidlgen_hlcpp:fidlgen_hlcpp_idk", |
| "//tools/fidl/fidlgen_rust:fidlgen_rust_idk", |
| ], |
| ) |
| |
| # Tools and data used on a host development machine to interact with a |
| # target device running Fuchsia. These are not needed to build the IDK or SDK. |
| # Some tools may depend on tools in peer molecules. |
| idk_host_molecule( |
| name = "non_build_host_tools", |
| deps = [ |
| # TODO(https://fxbug.dev/426130024): Fix the build and uncomment. |
| # "//src/sys/pkg/testing/fake-omaha-client:bin_idk", |
| "//tools/net/device-finder:device-finder_idk", |
| ], |
| ) |