blob: d5c2048855d6ff5413e8e57f5e38a7fe9dbf9ad9 [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 = [ "//sdk/testing/sl4f/client:client_sdk($dart_toolchain)" ]
}
sdk_molecule("fidl") {
visibility = [ ":*" ]
deps = [
"//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.castsetup:fuchsia.castsetup_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.castsysteminfo:fuchsia.castsysteminfo_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.component:fuchsia.component_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.factory:fuchsia.factory_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.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.location.namedplace:fuchsia.location.namedplace_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.memorypressure:fuchsia.memorypressure_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.migration:fuchsia.migration_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.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.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.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.web:fuchsia.web_sdk($fidl_toolchain)",
"//sdk/fidl/fuchsia.wlan.service:fuchsia.wlan.service_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-cobalt:fuchsia-cobalt_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-hardware-power-statecontrol:fuchsia-hardware-power-statecontrol_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-io:fuchsia-io_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-logger:fuchsia-logger_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-mem:fuchsia-mem_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-posix-socket:fuchsia-posix-socket_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-process:fuchsia-process_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-sysinfo:fuchsia-sysinfo_sdk($fidl_toolchain)",
"//zircon/system/fidl/fuchsia-tracing-provider:fuchsia-tracing-provider_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",
"//garnet/go/src/fidl:fidlgen_sdk",
"//src/sys/pkg/bin/far:bin_sdk",
"//src/sys/pkg/bin/pm:pm_bin_sdk",
"//tools/net/dev_finder:dev_finder_sdk",
"//tools/net/dev_finder:device-finder_sdk",
"//zircon/public/tool/bootserver:bootserver_sdk",
"//zircon/public/tool/fidl-format:fidl-format_sdk",
"//zircon/public/tool/fidlc:fidlc_sdk",
"//zircon/public/tool/fvm:fvm_sdk",
"//zircon/public/tool/loglistener:loglistener_sdk",
"//zircon/public/tool/merkleroot:merkleroot_sdk",
"//zircon/public/tool/minfs:minfs_sdk",
"//zircon/public/tool/zbi:zbi_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/async-default:async-default_sdk",
"//zircon/public/lib/async-loop:async-loop_sdk",
"//zircon/public/lib/async-loop-cpp:async-loop-cpp_sdk",
"//zircon/public/lib/async-loop-default:async-loop-default_sdk",
"//zircon/public/lib/async-testing:async-testing_sdk",
"//zircon/public/lib/fdio:fdio_sdk",
"//zircon/public/lib/inspect:inspect_sdk",
"//zircon/public/lib/memfs:memfs_sdk",
"//zircon/public/lib/sync:sync_sdk",
"//zircon/public/lib/syslog:syslog_sdk",
"//zircon/public/lib/trace:trace_sdk",
"//zircon/public/lib/trace-engine:trace-engine_sdk",
"//zircon/public/lib/trace-provider-so: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",
]
}
# Tools and libraries to develop for Fuchsia with Dart.
# TODO(gridman): Rename to fuchsia_dart after migration from //topaz/public/sdk is done.
sdk("fuchsia_dart2") {
category = "partner"
id = sdk_id
api = "fuchsia_dart.api"
deps = [
"//sdk/docs:modular_config_schema",
# TODO(viktard): remove, needed to soft transition
# https://fuchsia-review.googlesource.com/c/fuchsia/+/295264
"//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_sdk",
"//sdk/fidl/fuchsia.ui.input2:fuchsia.ui.input2_sdk",
# TODO(SCN-1343): Remove this temporary dependency.
# Temporarily added as a direct dependency so that it can be removed from
# //sdk/fidl/fuchsia.ui.views.
"//sdk/fidl/fuchsia.intl:fuchsia.intl_sdk",
"//topaz/bin/fidlgen_dart:fidlgen_dart_sdk_legacy($host_toolchain)",
"//topaz/public/dart/composition_delegate:composition_delegate_sdk($dart_toolchain)",
"//topaz/public/dart/fidl:fidl_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia:fuchsia_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_inspect:fuchsia_inspect_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_logger:fuchsia_logger_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_modular:fuchsia_modular_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_modular_testing:fuchsia_modular_testing_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_scenic:fuchsia_scenic_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_scenic_flutter:fuchsia_scenic_flutter_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_services:fuchsia_services_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_vfs:fuchsia_vfs_sdk($dart_toolchain)",
"//topaz/public/dart/fuchsia_webview_flutter:fuchsia_webview_flutter_sdk($dart_toolchain)",
"//topaz/runtime/dart:gen_snapshot_sdk($dart_toolchain)",
"//topaz/runtime/dart:kernel_compiler_sdk($host_toolchain)",
]
}
# The `modular_testing` SDK provides FIDL protocols and C++ libraries for writing hermetic
# integration tests which use modular.
#
# 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.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",
]
}