blob: c6c4bf4ff70d240921c0b97b37d6aaa7050f357d [file] [log] [blame]
# 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.
import("//build/bazel/bazel_fuchsia_sdk.gni")
import("//build/sdk/idk.gni")
import("//build/sdk/idk_archive.gni")
import("//build/sdk/sdk_collection.gni")
import("//build/sdk/sdk_final_manifest_golden.gni")
import("//build/sdk/sdk_molecule.gni")
visibility = [ ":*" ]
idk("pdk_idk") {
sdk_collection_label = ":pdk_collection_do_not_use"
# Nothing in the PDK is sensitive to API level or target CPU at this time, so
# set them to minimal values
api_levels = []
target_cpus = [ target_cpu ]
# There is no such target. This is okay because the values of `api_levels`
# and `target_cpus` ensure there are no sub-builds that would use it.
# Specifying a label serves to ensure no sub-builds are added because they
# would require that this target exist.
idk_subbuilds_label_prefix = ":non_existent_idk_subbuilds"
}
idk_archive("idk_archive") {
visibility += [ "//:*" ]
idk = ":pdk_idk"
}
generate_fuchsia_bazel_sdk("sdk") {
idk_export_target = ":pdk_idk"
idk_export_dir = "$root_build_dir/sdk/exported/pdk_idk"
output_name = "pdk_sdk"
}
sdk_final_manifest_golden("manifest_golden") {
golden = "//sdk/manifests/pdk.manifest"
idk_name = "pdk_idk"
idk_exported_label = ":pdk_idk"
}
# "Do not use" refers to the fact that the SDK collection is stored in a well
# known location (under $BUILD_DIR/sdk/export/pdk_collection_do_not_use), but
# that's only for historical reasons. The SDK collection is an intermediate build
# artifact and shouldn't be used directly by users.
sdk_collection("pdk_collection_do_not_use") {
category = "partner"
id = sdk_id
deps = [
# Don't add other sdk_molecules here. Add them to `all_atoms` below.
":all_atoms",
]
}
sdk_molecule("all_atoms") {
category = "partner"
deps = [
"//sdk:host_tools_for_configured_host_cpus",
"//sdk:version_history_sdk($default_toolchain)",
"//src/developer/ffx/lib/symbol-index:symbol-index-sdk",
]
}
group("tests") {
visibility += [ "*" ]
public_deps = [ ":manifest_golden" ]
}