• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS.  PLEASE
2//     CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
3//     DEPENDING ON IT IN YOUR PROJECT. ***
4package {
5    default_applicable_licenses: ["hardware_google_gfxstream_license"],
6}
7
8// Added automatically by a large-scale-change that took the approach of
9// 'apply every license found to every target'. While this makes sure we respect
10// every license restriction, it may not be entirely correct.
11//
12// e.g. GPL in an MIT project might only apply to the contrib/ directory.
13//
14// Please consider splitting the single license below into multiple licenses,
15// taking care not to lose any license_kind information, and overriding the
16// default license using the 'licenses: [...]' property on targets as needed.
17//
18// For unused files, consider creating a 'fileGroup' with "//visibility:private"
19// to attach the license to, and including a comment whether the files may be
20// used in the current project.
21// See: http://go/android-license-faq
22license {
23    name: "hardware_google_gfxstream_license",
24    visibility: [
25        "//hardware/google/aemu:__subpackages__",
26        ":__subpackages__",
27    ],
28    license_kinds: [
29        "SPDX-license-identifier-Apache-2.0",
30        "SPDX-license-identifier-BSD",
31        "SPDX-license-identifier-CC-BY-4.0",
32        "SPDX-license-identifier-ISC",
33        "SPDX-license-identifier-MIT",
34        "SPDX-license-identifier-BSL-1.0",
35        "legacy_unencumbered",
36    ],
37}
38
39cc_library_headers {
40    name: "gfxstream_headers",
41    vendor_available: true,
42    host_supported: true,
43    export_include_dirs: [
44        ".",
45        "include",
46        "host",
47        "host/gl",
48        "host/gl/glestranslator/include",
49        "host/vulkan",
50        "utils/include",
51    ],
52    header_libs: [
53        "aemu_common_headers",
54        "gfxstream_magma_headers",
55        "libgfxstream_vulkan_headers",
56    ],
57    export_header_lib_headers: [
58        "aemu_common_headers",
59        "gfxstream_magma_headers",
60        "libgfxstream_vulkan_headers",
61    ],
62    apex_available: [
63        "//apex_available:platform",
64        "com.android.virt",
65    ],
66}
67
68cc_library_headers {
69    name: "gfxstream_x11_headers",
70    vendor_available: true,
71    host_supported: true,
72    export_include_dirs: [
73        "host/apigen-codec-common",
74    ],
75    apex_available: [
76        "//apex_available:platform",
77        "com.android.virt",
78    ],
79}
80
81cc_library_headers {
82    name: "gfxstream_magma_headers",
83    vendor_available: true,
84    host_supported: true,
85    export_include_dirs: [
86        "third-party/fuchsia/magma/include",
87        // TODO(b/274956288): use consistent header paths
88        "third-party/fuchsia/magma/include/lib",
89    ],
90    apex_available: [
91        "//apex_available:platform",
92        "com.android.virt",
93    ],
94}
95
96cc_defaults {
97    name: "gfxstream_cc_defaults",
98    cflags: [
99        "-DGFXSTREAM",
100    ],
101}
102
103cc_defaults {
104    name: "gfxstream_guest_cc_defaults",
105    defaults: [
106        "gfxstream_cc_defaults",
107    ],
108}
109
110cc_defaults {
111    name: "gfxstream_host_cc_defaults",
112    defaults: [
113        "gfxstream_cc_defaults",
114    ],
115}
116
117cc_defaults {
118    name: "gfxstream_defaults",
119    cflags: [
120        // Android build system has some global cflags that we cannot override (e.g.
121        // -Werror=return-type), so -Wno-return-type and -Wno-return-type-c-linkage will not work.
122        // See build/soong/cc/config/global.go
123        "-DUSING_ANDROID_BP",
124        "-D_FILE_OFFSET_BITS=64",
125        "-DVK_GFXSTREAM_STRUCTURE_TYPE_EXT",
126        "-DGFXSTREAM_ENABLE_HOST_GLES=1",
127        "-DGFXSTREAM_ENABLE_HOST_VK_SNAPSHOT=1",
128        "-Wno-unreachable-code-loop-increment",
129        "-Wno-unused-parameter",
130        "-Wno-unused-function",
131        "-Wno-unused-variable",
132        "-Wno-ignored-qualifiers",
133        "-Wno-reorder-ctor",
134        "-Wno-mismatched-tags",
135        "-Wno-missing-field-initializers",
136        "-Wno-implicit-fallthrough",
137        "-Wno-unused-private-field",
138        "-Wno-macro-redefined",
139    ],
140    header_libs: [
141        "gfxstream_headers",
142        "gfxstream_x11_headers",
143    ],
144    target: {
145        host: {
146            compile_multilib: "64",
147            cflags: [
148                "-U__ANDROID__",
149                "-UANDROID",
150            ],
151        },
152        android: {
153            compile_multilib: "64",
154            shared_libs: ["libnativewindow"],
155        },
156        linux_bionic_arm64: {
157            enabled: true,
158            cflags: ["-Dandroidbionic"],
159        },
160    },
161    host_supported: true,
162    vendor_available: true,
163
164    apex_available: [
165        "//apex_available:platform",
166        "com.android.virt",
167    ],
168}
169