Greg Hartman | df9a4ca | 2018-08-27 21:35:45 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 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 | // |
| 16 | |
Bob Badour | 4b32fd2 | 2021-02-12 15:15:09 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["external_virglrenderer_license"], |
| 19 | } |
| 20 | |
| 21 | // Added automatically by a large-scale-change that took the approach of |
| 22 | // 'apply every license found to every target'. While this makes sure we respect |
| 23 | // every license restriction, it may not be entirely correct. |
| 24 | // |
| 25 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 26 | // |
| 27 | // Please consider splitting the single license below into multiple licenses, |
| 28 | // taking care not to lose any license_kind information, and overriding the |
| 29 | // default license using the 'licenses: [...]' property on targets as needed. |
| 30 | // |
| 31 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 32 | // to attach the license to, and including a comment whether the files may be |
| 33 | // used in the current project. |
| 34 | // |
| 35 | // large-scale-change included anything that looked like it might be a license |
| 36 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 37 | // |
| 38 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 39 | // See: http://go/android-license-faq |
| 40 | license { |
| 41 | name: "external_virglrenderer_license", |
| 42 | visibility: [":__subpackages__"], |
| 43 | license_kinds: [ |
| 44 | "SPDX-license-identifier-BSD", |
| 45 | "SPDX-license-identifier-BSL-1.0", |
| 46 | "SPDX-license-identifier-MIT", |
| 47 | ], |
| 48 | license_text: [ |
| 49 | "COPYING", |
| 50 | "LICENSE", |
| 51 | "NOTICE", |
| 52 | ], |
| 53 | } |
| 54 | |
Greg Hartman | df9a4ca | 2018-08-27 21:35:45 -0700 | [diff] [blame] | 55 | cc_library_headers { |
| 56 | name: "virgl_headers", |
| 57 | host_supported: true, |
| 58 | export_include_dirs: ["src"], |
| 59 | } |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 60 | |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 61 | cc_library { |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 62 | name: "libvirglrenderer", |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 63 | host_supported: true, |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 64 | cflags: [ |
| 65 | "-DHAVE_CONFIG_H", |
| 66 | "-Wno-null-pointer-arithmetic", |
| 67 | "-Wno-macro-redefined", |
| 68 | "-Wno-unused-function", |
| 69 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 70 | "-Wno-unused-parameter", |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 71 | ], |
| 72 | c_std: "experimental", |
| 73 | local_include_dirs: [ |
| 74 | "prebuilt-intermediates", |
| 75 | "src", |
| 76 | "src/gallium/auxiliary", |
| 77 | "src/gallium/auxiliary/util", |
| 78 | "src/gallium/include", |
| 79 | ], |
| 80 | srcs: [ |
| 81 | "prebuilt-intermediates/src/u_format_table.c", |
| 82 | "src/gallium/auxiliary/cso_cache/cso_cache.c", |
| 83 | "src/gallium/auxiliary/cso_cache/cso_hash.c", |
| 84 | "src/gallium/auxiliary/os/os_misc.c", |
| 85 | "src/gallium/auxiliary/tgsi/tgsi_build.c", |
| 86 | "src/gallium/auxiliary/tgsi/tgsi_dump.c", |
| 87 | "src/gallium/auxiliary/tgsi/tgsi_iterate.c", |
| 88 | "src/gallium/auxiliary/tgsi/tgsi_parse.c", |
| 89 | "src/gallium/auxiliary/tgsi/tgsi_sanity.c", |
| 90 | "src/gallium/auxiliary/tgsi/tgsi_scan.c", |
| 91 | "src/gallium/auxiliary/tgsi/tgsi_text.c", |
| 92 | "src/gallium/auxiliary/tgsi/tgsi_transform.c", |
| 93 | "src/gallium/auxiliary/tgsi/tgsi_info.c", |
| 94 | "src/gallium/auxiliary/tgsi/tgsi_strings.c", |
| 95 | "src/gallium/auxiliary/tgsi/tgsi_ureg.c", |
| 96 | "src/gallium/auxiliary/tgsi/tgsi_util.c", |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 97 | "src/gallium/auxiliary/util/u_bitmask.c", |
| 98 | "src/gallium/auxiliary/util/u_cpu_detect.c", |
| 99 | "src/gallium/auxiliary/util/u_debug.c", |
| 100 | "src/gallium/auxiliary/util/u_debug_describe.c", |
| 101 | "src/gallium/auxiliary/util/u_format.c", |
| 102 | "src/gallium/auxiliary/util/u_hash_table.c", |
| 103 | "src/gallium/auxiliary/util/u_math.c", |
| 104 | "src/gallium/auxiliary/util/u_texture.c", |
| 105 | "src/gallium/auxiliary/util/u_surface.c", |
| 106 | "src/iov.c", |
| 107 | "src/virgl_context.c", |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 108 | "src/virglrenderer.c", |
| 109 | "src/virgl_resource.c", |
| 110 | "src/virgl_util.c", |
| 111 | "src/vrend_blitter.c", |
| 112 | "src/vrend_debug.c", |
| 113 | "src/vrend_decode.c", |
| 114 | "src/vrend_formats.c", |
| 115 | "src/vrend_object.c", |
| 116 | "src/vrend_renderer.c", |
| 117 | "src/vrend_shader.c", |
| 118 | "src/vrend_tweaks.c", |
Alistair Delva | 35e6f52 | 2021-01-08 15:32:04 -0800 | [diff] [blame] | 119 | "src/vrend_winsys.c", |
| 120 | "src/vrend_winsys_egl.c", |
| 121 | "src/vrend_winsys_gbm.c", |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 122 | ], |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 123 | target: { |
Jiyong Park | 985a2f8 | 2020-09-18 16:32:21 +0900 | [diff] [blame] | 124 | linux_glibc: { |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 125 | // Avoid linking to another host copy of libdrm; this library will cause |
| 126 | // binary GPU drivers to be loaded from the host, which might be linked |
| 127 | // to a system copy of libdrm, which conflicts with the AOSP one |
| 128 | allow_undefined_symbols: true, |
Colin Cross | 2ebc584 | 2020-12-10 12:02:02 -0800 | [diff] [blame] | 129 | header_libs: ["libdrm_headers"], |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 130 | shared_libs: [ |
| 131 | "libepoxy", |
| 132 | "libgbm" |
| 133 | ], |
| 134 | }, |
Jiyong Park | 985a2f8 | 2020-09-18 16:32:21 +0900 | [diff] [blame] | 135 | linux_bionic: { |
| 136 | shared_libs: [ |
| 137 | "libdrm", |
| 138 | "libepoxy", |
| 139 | "libgbm", |
| 140 | ], |
| 141 | }, |
Alistair Delva | 0aa45e7 | 2020-08-28 13:37:03 -0700 | [diff] [blame] | 142 | android: { |
| 143 | shared_libs: [ |
| 144 | "libdrm", |
| 145 | "liblog", |
| 146 | ], |
| 147 | static_libs: [ |
| 148 | "libepoxy", |
| 149 | "libgbm", |
| 150 | ], |
| 151 | }, |
| 152 | }, |
Jiyong Park | ba9472b | 2020-12-07 15:09:42 +0900 | [diff] [blame] | 153 | apex_available: [ |
| 154 | "//apex_available:platform", |
| 155 | "com.android.virt", |
| 156 | ], |
Alistair Delva | 3df24ae | 2020-07-21 12:09:09 -0700 | [diff] [blame] | 157 | } |