Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 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 | |
Bob Badour | 8577c21 | 2021-03-15 09:40:36 -0700 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["device_google_cuttlefish_license"], |
| 18 | } |
| 19 | |
| 20 | // Added automatically by a large-scale-change that took the approach of |
| 21 | // 'apply every license found to every target'. While this makes sure we respect |
| 22 | // every license restriction, it may not be entirely correct. |
| 23 | // |
| 24 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 25 | // |
| 26 | // Please consider splitting the single license below into multiple licenses, |
| 27 | // taking care not to lose any license_kind information, and overriding the |
| 28 | // default license using the 'licenses: [...]' property on targets as needed. |
| 29 | // |
| 30 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 31 | // to attach the license to, and including a comment whether the files may be |
| 32 | // used in the current project. |
| 33 | // See: http://go/android-license-faq |
| 34 | license { |
| 35 | name: "device_google_cuttlefish_license", |
| 36 | visibility: [":__subpackages__"], |
| 37 | license_kinds: [ |
| 38 | "SPDX-license-identifier-Apache-2.0", |
| 39 | "SPDX-license-identifier-MIT", |
| 40 | ], |
| 41 | // large-scale-change unable to identify any license_text files |
| 42 | } |
| 43 | |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 44 | cc_library_headers { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 45 | name: "cuttlefish_common_headers", |
Justin Yun | 6ca23bd | 2020-12-11 17:16:37 +0900 | [diff] [blame] | 46 | vendor_available: true, |
| 47 | product_available: true, |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 48 | export_include_dirs: ["."], |
| 49 | host_supported: true, |
Jiyong Park | b86c2f7 | 2021-01-05 16:55:32 +0900 | [diff] [blame] | 50 | apex_available: [ |
| 51 | "//apex_available:platform", |
| 52 | "com.android.virt", |
| 53 | ], |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 54 | } |
| 55 | |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 56 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 57 | name: "cuttlefish_base", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 58 | gnu_extensions: false, |
| 59 | header_libs: [ |
| 60 | "cuttlefish_common_headers", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 61 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 62 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 63 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 64 | host_ldlibs: ["-lrt"], |
| 65 | cflags: ["-DCUTTLEFISH_HOST"], |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 66 | compile_multilib: "64", |
Ryan Haining | ed1fe92 | 2018-03-13 17:43:30 +0000 | [diff] [blame] | 67 | }, |
| 68 | // We don't need Darwin host-side builds |
| 69 | darwin: { |
| 70 | enabled: false, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 71 | }, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 72 | }, |
Cody Schuffelen | 88b82d5 | 2019-05-29 14:16:03 -0700 | [diff] [blame] | 73 | cflags: ["-Werror", "-Wall", "-D_FILE_OFFSET_BITS=64"], |
Jiyong Park | b86c2f7 | 2021-01-05 16:55:32 +0900 | [diff] [blame] | 74 | apex_available: [ |
| 75 | "//apex_available:platform", |
| 76 | "com.android.virt", |
| 77 | ], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 78 | } |
| 79 | |
Jiyong Park | 58c326b | 2021-01-05 16:52:58 +0900 | [diff] [blame] | 80 | // Defaults for cuttlefish modules that are available only in the guest OS (i.e. cuttlefish running |
| 81 | // in a guest VM). |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 82 | cc_defaults { |
Greg Hartman | e9adb54 | 2018-05-09 13:12:51 -0700 | [diff] [blame] | 83 | name: "cuttlefish_guest_only", |
Justin Yun | 6ca23bd | 2020-12-11 17:16:37 +0900 | [diff] [blame] | 84 | vendor: true, |
Greg Hartman | e9adb54 | 2018-05-09 13:12:51 -0700 | [diff] [blame] | 85 | defaults: ["cuttlefish_base"], |
| 86 | } |
| 87 | |
Jiyong Park | 58c326b | 2021-01-05 16:52:58 +0900 | [diff] [blame] | 88 | // Same as cuttlefish_guest_only, but modules are placed in /product partition. |
Greg Hartman | e9adb54 | 2018-05-09 13:12:51 -0700 | [diff] [blame] | 89 | cc_defaults { |
Jiyong Park | 58c326b | 2021-01-05 16:52:58 +0900 | [diff] [blame] | 90 | name: "cuttlefish_guest_product_only", |
| 91 | product_specific: true, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 92 | defaults: ["cuttlefish_base"], |
| 93 | } |
| 94 | |
Jiyong Park | 58c326b | 2021-01-05 16:52:58 +0900 | [diff] [blame] | 95 | // Defaults for cuttlefish modules that are available only in the host-side OS. Here "host" includes |
| 96 | // both (1) non-Android OS like gLinux or Ubuntu, and (2) Android OS that is capable of running |
| 97 | // guest VM(s) in it. Note that, in the context of the Android build systm - Soong - (1) is called |
| 98 | // as "host" and (2) is called as "target". But here, the term "host" is in the context of VMs. If a |
| 99 | // module is for the host-side VM (either Android or non-Android), "cuttlefish_host" shall be used. |
| 100 | cc_defaults { |
| 101 | name: "cuttlefish_host", |
| 102 | host_supported: true, // this "host" means (1) |
| 103 | device_supported: true, // this is for (2) |
| 104 | vendor_available: true, |
| 105 | defaults: ["cuttlefish_base"], |
| 106 | } |
| 107 | |
| 108 | // Same as "cuttlefish_host", but only for non-Android OS. |
| 109 | cc_defaults { |
| 110 | name: "cuttlefish_buildhost_only", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 111 | host_supported: true, |
Jiyong Park | 58c326b | 2021-01-05 16:52:58 +0900 | [diff] [blame] | 112 | device_supported: false, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 113 | defaults: ["cuttlefish_base"], |
| 114 | } |
Ram Muthiah | 0f7fc06 | 2019-12-10 15:48:14 -0800 | [diff] [blame] | 115 | |
| 116 | cc_defaults { |
| 117 | name: "cuttlefish_recovery_available", |
| 118 | recovery_available : true |
| 119 | } |
| 120 | |
| 121 | cc_defaults { |
| 122 | name: "enabled_on_p_and_later", |
| 123 | enabled: true |
| 124 | } |
| 125 | |
| 126 | cc_defaults { |
| 127 | name: "enabled_on_q_and_later", |
| 128 | enabled: true |
| 129 | } |
| 130 | |
| 131 | cc_defaults { |
| 132 | name: "enabled_on_q_internal_and_later", |
| 133 | enabled: true |
| 134 | } |
| 135 | |
| 136 | cc_defaults { |
Ram Muthiah | 0f7fc06 | 2019-12-10 15:48:14 -0800 | [diff] [blame] | 137 | name: "cuttlefish_libicuuc", |
Alistair Delva | 8cd279f | 2020-09-03 08:35:39 -0700 | [diff] [blame] | 138 | target: { |
| 139 | host: { |
| 140 | shared_libs: [ |
| 141 | "libicuuc", |
| 142 | ], |
| 143 | }, |
| 144 | }, |
Ram Muthiah | 0f7fc06 | 2019-12-10 15:48:14 -0800 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | cc_defaults { |
| 148 | name: "cuttlefish_health_storage", |
| 149 | defaults: ["enabled_on_q_and_later"], |
Ram Muthiah | 0f7fc06 | 2019-12-10 15:48:14 -0800 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | java_test_host { |
| 153 | name: "tombstone_transmit_tests", |
| 154 | |
| 155 | libs: ["tradefed"], |
| 156 | |
| 157 | srcs: ["tests/src/**/TombstoneTransmitTest.java"], |
| 158 | |
| 159 | test_config: "tests/tombstone-transmit-tests.xml", |
| 160 | |
| 161 | test_suites: ["general-tests"], |
| 162 | } |
Jiyong Park | 4613c42 | 2021-02-01 22:14:13 +0900 | [diff] [blame] | 163 | |
| 164 | filegroup { |
| 165 | name: "cf_dtb", |
| 166 | srcs: ["dtb.img"], |
| 167 | } |