blob: d52a71ef96f0f57b059cf1b47eab315f92547ab8 [file] [log] [blame]
# Copyright 2021 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/assembly/assembly_input_bundle.gni")
import("//build/python/python_action.gni")
import("//build/security.gni")
if (is_fuchsia) {
qemu_kernel_file = ""
qemu_kernel_target = ""
if (target_cpu == "x64") {
qemu_kernel_file = "$root_build_dir/multiboot.bin"
qemu_kernel_target =
"//zircon/kernel/arch/x86/phys/boot-shim:multiboot-shim"
} else if (target_cpu == "arm64") {
qemu_kernel_file = "$root_build_dir/qemu-boot-shim.bin"
qemu_kernel_target = "//zircon/kernel/target/arm64/boot-shim:qemu"
} else {
assert(false, "Unsupported target cpu: $target_cpu")
}
assembly_input_bundle("emulator_support") {
qemu_kernel = qemu_kernel_file
deps = [ qemu_kernel_target ]
# Create package and archive for use OOT.
create_aib_package = true
create_aib_archive = true
}
group("assembly") {
public_deps = [
":emulator_support",
"scripts:assembly_input_bundle_tool_install($host_toolchain)",
]
}
python_action("validate_product_defs") {
binary_label = "//build/assembly/scripts:product_def_gn_arg_validator"
outputs = [ "$target_out_dir/$target_name.txt" ]
depfile = outputs[0] + ".d"
args = [
"--output",
rebase_path(outputs[0], root_build_dir),
"--depfile",
rebase_path(depfile, root_build_dir),
"--source-root",
rebase_path("//", root_build_dir),
]
}
}
if (is_host) {
group("host_tests") {
testonly = true
deps = [ "scripts:tests($host_toolchain)" ]
}
}