blob: 868dec50e920a58a72f1995d7cf43adda64ac8e3 [file] [log] [blame]
# 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.
import("//build/banjo/toolchain.gni")
import("//build/dart/toolchain.gni")
import("//build/fidl/toolchain.gni")
import("//build/sdk/sdk.gni")
import("//build/sdk/sdk_documentation.gni")
import("config.gni")
# This default target should contain all public or partner SDKs.
group("sdk") {
testonly = true
public_deps = [
":core",
":e2e_testing",
":modular_testing",
":zircon_sysroot",
]
}
sdk_documentation("open_source") {
name = "open_source"
category = "public"
files = []
foreach(file,
[
"AUTHORS",
"LICENSE",
"PATENTS",
]) {
files += [
{
source = "//$file"
dest = file
},
]
}
}
sdk_documentation("musl_license") {
name = "musl_license"
category = "public"
files = [
{
source = "//zircon/third_party/ulib/musl/COPYRIGHT"
dest = "COPYRIGHT.musl"
},
]
}
sdk_molecule("license") {
visibility = [ ":*" ]
deps = [
":musl_license",
":open_source",
]
}
sdk("zircon_sysroot") {
category = "internal"
export = true
deps = [ "//zircon/public/sysroot:sysroot_sdk" ]
}
sdk("e2e_testing") {
# TODO(DX-1314): this id should not be necessary.
id = sdk_id
category = "partner"
api = "e2e_testing.api"
deps = [
":e2e_testing_tools",
"//sdk/testing/sl4f/client:client_sdk($dart_toolchain)",
]
}
sdk_molecule("e2e_testing_tools") {
visibility = [ ":*" ]
deps = [ "//garnet/bin/trace2json:bin_sdk($host_toolchain)" ]
}
sdk_molecule("fidl") {
visibility = [ ":*" ]
deps = [
"//sdk/fidl/fuchsia.accessibility.gesture:fuchsia.accessibility.gesture_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.auth.oldtokens:fuchsia.auth.oldtokens_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.bluetooth.a2dp:fuchsia.bluetooth.a2dp_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.bluetooth.control:fuchsia.bluetooth.control_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.bluetooth.gatt:fuchsia.bluetooth.gatt_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.camera:fuchsia.camera_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.camera2:fuchsia.camera2_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.camera2.hal:fuchsia.camera2.hal_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.camera3:fuchsia.camera3_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castauth:fuchsia.castauth_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castconfig:fuchsia.castconfig_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castremotecontrol:fuchsia.castremotecontrol_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castsetup:fuchsia.castsetup_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castsysteminfo:fuchsia.castsysteminfo_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castwindow:fuchsia.castwindow_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.component:fuchsia.component_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.data:fuchsia.data_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.deprecatedtimezone:fuchsia.deprecatedtimezone_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.developer.tiles:fuchsia.developer.tiles_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.factory:fuchsia.factory_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.factory.wlan:fuchsia.factory.wlan_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.fonts:fuchsia.fonts_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hardware.goldfish:fuchsia.hardware.goldfish_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hardware.light:fuchsia.hardware.light_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.images:fuchsia.images_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.input:fuchsia.input_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.io:fuchsia.io_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.legacymetrics:fuchsia.legacymetrics_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.location:fuchsia.location_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.location.namedplace:fuchsia.location.namedplace_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.location.position:fuchsia.location.position_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.location.sensor:fuchsia.location.sensor_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.math:fuchsia.math_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media:fuchsia.media_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.audio:fuchsia.media.audio_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.drm:fuchsia.media.drm_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.playback:fuchsia.media.playback_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.sessions2:fuchsia.media.sessions2_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.sounds:fuchsia.media.sounds_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.media.target:fuchsia.media.target_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.mem:fuchsia.mem_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.migration:fuchsia.migration_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.modular.auth:fuchsia.modular.auth_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.net.http:fuchsia.net.http_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.net.mdns:fuchsia.net.mdns_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.net.oldhttp:fuchsia.net.oldhttp_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.netstack:fuchsia.netstack_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.process:fuchsia.process_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.recovery:fuchsia.recovery_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.recovery.ui:fuchsia.recovery.ui_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.settings:fuchsia.settings_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.sys:fuchsia.sys_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.sys.test:fuchsia.sys.test_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.activity:fuchsia.ui.activity_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.activity.control:fuchsia.ui.activity.control_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.brightness:fuchsia.ui.brightness_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.gfx:fuchsia.ui.gfx_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.input2:fuchsia.ui.input2_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.policy:fuchsia.ui.policy_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.types:fuchsia.ui.types_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ultrasound:fuchsia.ultrasound_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.update:fuchsia.update_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.update.channel:fuchsia.update.channel_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.update.channelcontrol:fuchsia.update.channelcontrol_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.url:fuchsia.url_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.weave:fuchsia.weave_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.web:fuchsia.web_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.policy:fuchsia.wlan.policy_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.product.deprecatedconfiguration:fuchsia.wlan.product.deprecatedconfiguration_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.service:fuchsia.wlan.service_sdk($fidl_toolchain)",
]
}
sdk_molecule("core_tools") {
visibility = [ ":*" ]
# TODO: Move to cross_compiled once it's possible to cross-compile them.
not_cross_compiled = [
"//src/developer/debug/zxdb:zxdb_sdk",
"//src/sys/cmc:cmc_sdk",
"//tools/fidlcat:fidlcat_sdk",
]
cross_compiled = [
"tools:symbolize_sdk",
"//tools/fidl/fidlgen_hlcpp:fidlgen_sdk",
"//src/sys/pkg/bin/far:bin_sdk",
"//src/sys/pkg/bin/pm:pm_bin_sdk",
"//tools/bootserver_old:bootserver_sdk",
"//tools/loglistener:loglistener_sdk",
"//tools/net/dev_finder:dev_finder_sdk",
"//tools/net/dev_finder:device-finder_sdk",
"//zircon/public/tool/fidl-format:fidl-format_sdk",
"//zircon/public/tool/fidlc:fidlc_sdk",
"//zircon/public/tool/zbi:zbi_sdk",
"//zircon/tools/fvm:fvm_sdk",
"//zircon/tools/merkleroot:merkleroot_sdk",
"//zircon/tools/minfs:minfs_sdk",
]
toolchains = []
if (host_os == "linux") {
toolchains += [
host_x64_toolchain,
host_arm64_toolchain,
]
} else if (host_os == "mac") {
toolchains += [ host_toolchain ]
}
deps = []
foreach(toolchain, toolchains) {
foreach(dep, cross_compiled) {
deps += [ "$dep($toolchain)" ]
if (toolchain == host_toolchain) {
deps += [ "${dep}_legacy($toolchain)" ]
}
}
if (toolchain == host_toolchain) {
foreach(dep, not_cross_compiled) {
deps += [
"$dep($toolchain)",
"${dep}_legacy($toolchain)",
]
}
}
}
}
sdk_molecule("core_lib") {
visibility = [ ":*" ]
testonly = true
deps = [
"//sdk/lib/fidl/cpp:cpp_sdk",
"//sdk/lib/inspect/service/cpp:cpp_sdk",
"//sdk/lib/media/cpp:cpp_sdk",
"//sdk/lib/modular/cpp:cpp_sdk",
"//sdk/lib/svc:svc_sdk",
"//sdk/lib/sys/cpp:cpp_sdk",
"//sdk/lib/sys/cpp/testing:unit_sdk",
"//sdk/lib/sys/inspect/cpp:cpp_sdk",
"//sdk/lib/ui/scenic/cpp:cpp_sdk",
"//sdk/lib/vfs/cpp:cpp_sdk",
"//zircon/public/lib/async:async_sdk",
"//zircon/public/lib/async-cpp:async-cpp_sdk",
"//zircon/public/lib/fdio:fdio_sdk",
"//zircon/public/lib/sync:sync_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/async-testing:async-testing_sdk",
"//zircon/system/ulib/inspect:inspect_sdk",
"//zircon/system/ulib/memfs:memfs_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",
]
}
sdk("core") {
id = sdk_id
category = "partner"
api = "core.api"
testonly = true
deps = [
":core_lib",
":core_tools",
":fidl",
":license",
"devices",
"docs",
"//src/lib/vulkan:vulkan_layers",
"//third_party/Vulkan-Loader:libvulkan_sdk",
"//third_party/Vulkan-Loader:vulkan_license",
"//zircon/public/sysroot:sysroot_sdk",
]
}
# The `modular_testing` SDK provides FIDL protocols and C++ libraries for writing hermetic
# integration tests which use modular.
#
# The modular framework is deprecated: new products should use the session framework
# instead. See //docs/concepts/session/introduction.md.
#
# This SDK has runtime dependencies on the following fuchsia packages:
# * environment_delegating_runner
# * modular_test_harness
sdk("modular_testing") {
testonly = true
id = sdk_id
api = "modular_testing.api"
category = "partner"
deps = [
"//sdk/fidl/fuchsia.modular:fuchsia.modular_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.modular.auth:fuchsia.modular.auth_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.modular.testing:fuchsia.modular.testing_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.ui.lifecycle:fuchsia.ui.lifecycle_sdk($fidl_toolchain)",
"//sdk/lib/modular/testing/cpp:cpp_sdk",
]
}