1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_binary_host { 21 name: "assemble_cvd", 22 srcs: [ 23 "alloc.cc", 24 "assemble_cvd.cc", 25 "boot_config.cc", 26 "boot_image_utils.cc", 27 "bootconfig_args.cpp", 28 "clean.cc", 29 "disk/factory_reset_protected.cc", 30 "disk/gem5_image_unpacker.cpp", 31 "disk/generate_persistent_bootconfig.cpp", 32 "disk/generate_persistent_vbmeta.cpp", 33 "disk/initialize_instance_composite_disk.cc", 34 "disk/kernel_ramdisk_repacker.cpp", 35 "disk_builder.cpp", 36 "disk_flags.cc", 37 "display.cpp", 38 "flag_feature.cpp", 39 "flags.cc", 40 "graphics_flags.cc", 41 "kernel_module_parser.cc", 42 "misc_info.cc", 43 "network_flags.cpp", 44 "super_image_mixer.cc", 45 "touchpad.cpp", 46 "vendor_dlkm_utils.cc", 47 ], 48 header_libs: [ 49 "bootimg_headers", 50 ], 51 shared_libs: [ 52 "libbase", 53 "libcuttlefish_allocd_utils", 54 "libcuttlefish_command_util", 55 "libcuttlefish_fs", 56 "libcuttlefish_utils", 57 "libfruit", 58 "libjsoncpp", 59 "libprotobuf-cpp-full", 60 "libz", 61 "libziparchive", 62 ], 63 static_libs: [ 64 "libcdisk_spec", 65 "libcuttlefish_avb", 66 "libcuttlefish_host_config", 67 "libcuttlefish_host_config_adb", 68 "libcuttlefish_host_config_fastboot", 69 "libcuttlefish_launch_cvd_proto", 70 "libcuttlefish_vm_manager", 71 "libgflags", 72 "libgfxstream_graphics_detector_proto", 73 "libimage_aggregator", 74 "libsparse", 75 ], 76 required: [ 77 "avbtool", 78 "bootloader_crosvm_aarch64", 79 "bootloader_crosvm_x86_64", 80 "bootloader_qemu_aarch64", 81 "bootloader_qemu_x86_64", 82 "cvd_avb_pubkey_rsa2048", 83 "cvd_avb_pubkey_rsa4096", 84 "cvd_avb_testkey_rsa2048", 85 "cvd_avb_testkey_rsa4096", 86 "cvd_config_phone.json", 87 "extract-ikconfig", 88 "lz4", 89 "mkenvimage_slim", 90 "simg2img", 91 "unpack_bootimg", 92 ], 93 target: { 94 darwin: { 95 enabled: true, 96 }, 97 linux: { 98 required: [ 99 "mkuserimg_mke2fs", 100 ], 101 }, 102 }, 103 defaults: ["cuttlefish_host"], 104} 105 106cc_test_host { 107 name: "cf_assemble_tests", 108 shared_libs: [ 109 "libbase", 110 "libcurl", 111 "libcuttlefish_fs", 112 "libcuttlefish_utils", 113 "libfruit", 114 "liblog", 115 "libprotobuf-cpp-full", 116 ], 117 srcs: [ 118 "unittest/main_test.cc", 119 "unittest/utils_tests.cpp", 120 ], 121 static_libs: [ 122 "libcuttlefish_host_config", 123 "libcuttlefish_launch_cvd_proto", 124 "libcuttlefish_msg_queue", 125 "libgflags", 126 "libgmock", 127 ], 128 test_options: { 129 unit_test: true, 130 }, 131 defaults: ["cuttlefish_host"], 132} 133