blob: 03dc99c6fe17a71334f99320b62beeb5efe7513c [file] [log] [blame]
# Copyright 2020 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/product.gni")
import("//build/security.gni")
import("//build/security/policies.gni")
import("//build/security/policies_swd.gni")
import("//src/sys/root/build/root.gni")
if (is_host) {
group("host") {
testonly = true
# This causes all labels listed in the GN arg to be assumed to be in the
# host toolchain, but if a different toolchain is specified, it is
# preserved.
#
# [ "//some/label", "//some/other:label(//some/toolchain)" ]
#
# becomes
#
# [ "//some/label($host_toolchain)", "//some/other:label(//some/toolchain)"]
#
# This is for cases where the product needs to build "host tools" for
# specific platforms that aren't necessarily the one that the compilation
# is running on.
deps = product_host_labels
}
} else {
## These should only be in the default toolchain.
assert(current_toolchain == default_toolchain)
root_realm("root") {
core_package_name = core_realm_package_name
}
group("bootfs_labels") {
testonly = fuchsia_zbi_testonly
deps = product_bootfs_labels + [ ":root" ]
}
group("system_image_deps") {
testonly = fuchsia_zbi_testonly
deps = product_system_image_deps
if (defined(policy_labels.swd)) {
foreach(policy, policies_swd) {
if (policy.name == policy_labels.swd) {
deps += policy.system_image_deps
}
}
}
}
}