• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16package {
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
34license {
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
44cc_library_headers {
45    name: "cuttlefish_common_headers",
46    vendor_available: true,
47    product_available: true,
48    export_include_dirs: ["."],
49    host_supported: true,
50    apex_available: [
51        "//apex_available:platform",
52        "com.android.virt",
53    ],
54}
55
56cc_defaults {
57    name: "cuttlefish_base",
58    gnu_extensions: false,
59    header_libs: [
60        "cuttlefish_common_headers",
61    ],
62    target: {
63        host: {
64            host_ldlibs: ["-lrt"],
65            cflags: ["-DCUTTLEFISH_HOST"],
66            compile_multilib: "64",
67        },
68        // We don't need Darwin host-side builds
69        darwin: {
70            enabled: false,
71        },
72    },
73    cflags: ["-Werror", "-Wall", "-D_FILE_OFFSET_BITS=64"],
74    apex_available: [
75        "//apex_available:platform",
76        "com.android.virt",
77    ],
78}
79
80// Defaults for cuttlefish modules that are available only in the guest OS (i.e. cuttlefish running
81// in a guest VM).
82cc_defaults {
83    name: "cuttlefish_guest_only",
84    vendor: true,
85    defaults: ["cuttlefish_base"],
86}
87
88// Same as cuttlefish_guest_only, but modules are placed in /product partition.
89cc_defaults {
90    name: "cuttlefish_guest_product_only",
91    product_specific: true,
92    defaults: ["cuttlefish_base"],
93}
94
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.
100cc_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.
109cc_defaults {
110    name: "cuttlefish_buildhost_only",
111    host_supported: true,
112    device_supported: false,
113    defaults: ["cuttlefish_base"],
114}
115
116cc_defaults {
117  name: "cuttlefish_recovery_available",
118  recovery_available : true
119}
120
121cc_defaults {
122  name: "enabled_on_p_and_later",
123  enabled: true
124}
125
126cc_defaults {
127  name: "enabled_on_q_and_later",
128  enabled: true
129}
130
131cc_defaults {
132  name: "enabled_on_q_internal_and_later",
133  enabled: true
134}
135
136cc_defaults {
137    name: "cuttlefish_libicuuc",
138    target: {
139        host: {
140            shared_libs: [
141                "libicuuc",
142            ],
143        },
144    },
145}
146
147cc_defaults {
148    name: "cuttlefish_health_storage",
149    defaults: ["enabled_on_q_and_later"],
150}
151
152java_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}
163
164filegroup {
165    name: "cf_dtb",
166    srcs: ["dtb.img"],
167}
168