Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 1 | // Build the ETC1 library |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 2 | package { |
| 3 | // See: http://go/android-license-faq |
| 4 | // A large-scale-change added 'default_applicable_licenses' to import |
| 5 | // all of the 'license_kinds' from "frameworks_native_license" |
| 6 | // to get the below license kinds: |
| 7 | // SPDX-license-identifier-Apache-2.0 |
| 8 | default_applicable_licenses: ["frameworks_native_license"], |
| 9 | } |
| 10 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 11 | cc_library { |
| 12 | name: "libETC1", |
| 13 | srcs: ["ETC1/etc1.cpp"], |
| 14 | host_supported: true, |
Spandan Das | 4a5e3f2 | 2022-09-08 21:49:51 +0000 | [diff] [blame] | 15 | cflags: [ |
| 16 | "-Wall", |
| 17 | "-Werror", |
| 18 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 19 | |
| 20 | target: { |
| 21 | android: { |
| 22 | static: { |
| 23 | enabled: false, |
| 24 | }, |
| 25 | }, |
| 26 | host: { |
| 27 | shared: { |
| 28 | enabled: false, |
| 29 | }, |
| 30 | }, |
| 31 | windows: { |
| 32 | enabled: true, |
| 33 | }, |
| 34 | }, |
| 35 | } |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 36 | |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 37 | // The headers modules are in frameworks/native/opengl/Android.bp. |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 38 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 39 | name: "libEGL", |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 40 | symbol_file: "libEGL.map.txt", |
| 41 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 42 | unversioned_until: "current", |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 43 | } |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 44 | |
| 45 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 46 | name: "libGLESv1_CM", |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 47 | symbol_file: "libGLESv1_CM.map.txt", |
| 48 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 49 | unversioned_until: "current", |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 50 | } |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 51 | |
| 52 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 53 | name: "libGLESv2", |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 54 | symbol_file: "libGLESv2.map.txt", |
| 55 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 56 | unversioned_until: "current", |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 57 | } |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 58 | |
| 59 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 60 | name: "libGLESv3", |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 61 | symbol_file: "libGLESv3.map.txt", |
| 62 | first_version: "18", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 63 | unversioned_until: "current", |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 64 | } |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 65 | |
| 66 | cc_defaults { |
| 67 | name: "gl_libs_defaults", |
| 68 | cflags: [ |
| 69 | "-DGL_GLEXT_PROTOTYPES", |
| 70 | "-DEGL_EGLEXT_PROTOTYPES", |
| 71 | "-fvisibility=hidden", |
Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame] | 72 | "-Wall", |
| 73 | "-Werror", |
| 74 | "-Wno-unused-variable", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 75 | ], |
| 76 | shared_libs: [ |
Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 77 | // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** |
| 78 | // In particular, DO NOT add libutils or anything "above" libcutils |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 79 | "libcutils", |
| 80 | "liblog", |
| 81 | "libdl", |
| 82 | ], |
Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 83 | static_libs: [ |
| 84 | "libarect", |
| 85 | ], |
| 86 | header_libs: [ |
Christopher Ferris | ddd1d6b | 2019-09-26 08:27:25 -0700 | [diff] [blame] | 87 | "bionic_libc_platform_headers", |
Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 88 | "gl_headers", |
| 89 | "libsystem_headers", |
Jiyong Park | a243e5d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 90 | "libnativebase_headers", |
| 91 | ], |
| 92 | export_header_lib_headers: ["gl_headers"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | //############################################################################## |
| 96 | // Build META EGL library |
| 97 | // |
| 98 | cc_defaults { |
| 99 | name: "egl_libs_defaults", |
| 100 | defaults: ["gl_libs_defaults"], |
| 101 | cflags: [ |
| 102 | "-DLOG_TAG=\"libEGL\"", |
Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame] | 103 | "-Wall", |
| 104 | "-Werror", |
| 105 | "-Wno-error=deprecated-register", |
| 106 | "-Wno-error=unknown-attributes", |
| 107 | "-Wno-unused-variable", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 108 | ], |
| 109 | shared_libs: [ |
Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 110 | // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** |
| 111 | // In particular, DO NOT add libutils nor anything "above" libui |
Jiyong Park | 27c39e1 | 2017-05-08 13:00:02 +0900 | [diff] [blame] | 112 | "libgraphicsenv", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 113 | "libnativewindow", |
Michael Hoisie | 4e0f56b | 2020-04-30 18:40:55 -0400 | [diff] [blame] | 114 | "libbase", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 115 | ], |
| 116 | } |
| 117 | |
| 118 | cc_library_static { |
| 119 | name: "libEGL_getProcAddress", |
| 120 | defaults: ["egl_libs_defaults"], |
| 121 | srcs: ["EGL/getProcAddress.cpp"], |
| 122 | arch: { |
| 123 | arm: { |
| 124 | instruction_set: "arm", |
| 125 | }, |
| 126 | }, |
| 127 | } |
| 128 | |
Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 129 | cc_library_static { |
| 130 | name: "libEGL_blobCache", |
| 131 | defaults: ["egl_libs_defaults"], |
| 132 | srcs: [ |
| 133 | "EGL/BlobCache.cpp", |
| 134 | "EGL/FileBlobCache.cpp", |
Cody Northrop | 6cca6c2 | 2023-02-08 20:23:13 -0700 | [diff] [blame] | 135 | "EGL/MultifileBlobCache.cpp", |
Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 136 | ], |
| 137 | export_include_dirs: ["EGL"], |
Jisun Lee | 88a1b76 | 2024-10-17 20:12:29 +0900 | [diff] [blame^] | 138 | shared_libs: [ |
| 139 | "libz", |
| 140 | ], |
Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 141 | } |
| 142 | |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 143 | cc_library_shared { |
| 144 | name: "libEGL", |
| 145 | defaults: ["egl_libs_defaults"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 146 | llndk: { |
| 147 | symbol_file: "libEGL.map.txt", |
Colin Cross | ed0e6e6 | 2021-04-26 17:19:59 -0700 | [diff] [blame] | 148 | export_llndk_headers: ["gl_headers"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 149 | // Don't export EGL/include from the LLNDK variant. |
| 150 | override_export_include_dirs: [], |
| 151 | }, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 152 | srcs: [ |
| 153 | "EGL/egl_tls.cpp", |
| 154 | "EGL/egl_cache.cpp", |
| 155 | "EGL/egl_display.cpp", |
| 156 | "EGL/egl_object.cpp", |
Cody Northrop | 629ce4e | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 157 | "EGL/egl_layers.cpp", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 158 | "EGL/egl.cpp", |
Cody Northrop | 68d1035 | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 159 | "EGL/eglApi.cpp", |
Cody Northrop | 0ec5d38 | 2018-10-15 07:22:07 -0600 | [diff] [blame] | 160 | "EGL/egl_platform_entries.cpp", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 161 | "EGL/Loader.cpp", |
Tobin Ehlis | 96a184d | 2018-07-18 16:14:07 -0600 | [diff] [blame] | 162 | "EGL/egl_angle_platform.cpp", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 163 | ], |
Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 164 | shared_libs: [ |
| 165 | "libvndksupport", |
| 166 | "android.hardware.configstore@1.0", |
| 167 | "android.hardware.configstore-utils", |
Cody Northrop | 629ce4e | 2018-10-15 07:22:09 -0600 | [diff] [blame] | 168 | "libbase", |
Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 169 | "libhidlbase", |
Jiyong Park | bd1ddb2 | 2019-02-18 21:22:28 +0900 | [diff] [blame] | 170 | "libnativebridge_lazy", |
| 171 | "libnativeloader_lazy", |
Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 172 | "libutils", |
Sundong Ahn | 204fb1f | 2020-04-23 21:56:36 +0900 | [diff] [blame] | 173 | "libSurfaceFlingerProp", |
Christopher Ferris | dfb50b4 | 2022-03-23 12:37:58 -0700 | [diff] [blame] | 174 | "libunwindstack", |
Jisun Lee | 88a1b76 | 2024-10-17 20:12:29 +0900 | [diff] [blame^] | 175 | "libz", |
Courtney Goeltzenleuchter | 1b71702 | 2017-07-07 14:55:40 -0600 | [diff] [blame] | 176 | ], |
Stan Iliev | 9e7cd07 | 2017-10-09 15:56:10 -0400 | [diff] [blame] | 177 | static_libs: [ |
| 178 | "libEGL_getProcAddress", |
| 179 | "libEGL_blobCache", |
| 180 | ], |
Yu Liu | 1b5902e | 2022-09-22 12:14:34 -0700 | [diff] [blame] | 181 | ldflags: [ |
| 182 | "-Wl,--exclude-libs=libEGL_getProcAddress.a", |
| 183 | "-Wl,--exclude-libs=libEGL_blobCache.a", |
| 184 | "-Wl,--Bsymbolic-functions", |
| 185 | ], |
Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 186 | export_include_dirs: ["EGL/include"], |
jorgegil@google.com | e814151 | 2019-11-21 13:42:16 -0800 | [diff] [blame] | 187 | stubs: { |
| 188 | symbol_file: "libEGL.map.txt", |
| 189 | versions: ["29"], |
| 190 | }, |
Sundong Ahn | 204fb1f | 2020-04-23 21:56:36 +0900 | [diff] [blame] | 191 | header_libs: ["libsurfaceflinger_headers"], |
Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | cc_test { |
| 195 | name: "libEGL_test", |
| 196 | defaults: ["egl_libs_defaults"], |
| 197 | srcs: [ |
| 198 | "EGL/BlobCache.cpp", |
| 199 | "EGL/BlobCache_test.cpp", |
Cody Northrop | 999db23 | 2023-02-27 17:02:50 -0700 | [diff] [blame] | 200 | "EGL/FileBlobCache.cpp", |
Cody Northrop | 6cca6c2 | 2023-02-08 20:23:13 -0700 | [diff] [blame] | 201 | "EGL/MultifileBlobCache.cpp", |
| 202 | "EGL/MultifileBlobCache_test.cpp", |
| 203 | ], |
| 204 | shared_libs: [ |
| 205 | "libutils", |
Jisun Lee | 88a1b76 | 2024-10-17 20:12:29 +0900 | [diff] [blame^] | 206 | "libz", |
Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 207 | ], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | cc_defaults { |
| 211 | name: "gles_libs_defaults", |
| 212 | defaults: ["gl_libs_defaults"], |
| 213 | arch: { |
| 214 | arm: { |
| 215 | instruction_set: "arm", |
| 216 | |
| 217 | // TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 218 | ldflags: ["-Wl,--hash-style,both"], |
| 219 | }, |
| 220 | }, |
| 221 | shared_libs: ["libEGL"], |
| 222 | } |
| 223 | |
| 224 | //############################################################################## |
| 225 | // Build the wrapper OpenGL ES 1.x library |
| 226 | // |
| 227 | cc_library_shared { |
| 228 | name: "libGLESv1_CM", |
| 229 | defaults: ["gles_libs_defaults"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 230 | llndk: { |
| 231 | symbol_file: "libGLESv1_CM.map.txt", |
Colin Cross | ed0e6e6 | 2021-04-26 17:19:59 -0700 | [diff] [blame] | 232 | export_llndk_headers: ["gl_headers"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 233 | // Don't export EGL/include from the LLNDK variant. |
| 234 | override_export_include_dirs: [], |
| 235 | }, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 236 | srcs: ["GLES_CM/gl.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 237 | cflags: ["-DLOG_TAG=\"libGLESv1\""], |
dimitry | 0b586e8 | 2018-12-11 14:33:30 +0100 | [diff] [blame] | 238 | version_script: "libGLESv1_CM.map.txt", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 239 | } |
| 240 | |
| 241 | //############################################################################## |
| 242 | // Build the wrapper OpenGL ES 2.x library |
| 243 | // |
| 244 | cc_library_shared { |
| 245 | name: "libGLESv2", |
| 246 | defaults: ["gles_libs_defaults"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 247 | llndk: { |
| 248 | symbol_file: "libGLESv2.map.txt", |
Colin Cross | ed0e6e6 | 2021-04-26 17:19:59 -0700 | [diff] [blame] | 249 | export_llndk_headers: ["gl_headers"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 250 | // Don't export EGL/include from the LLNDK variant. |
| 251 | override_export_include_dirs: [], |
| 252 | }, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 253 | srcs: ["GLES2/gl2.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 254 | cflags: ["-DLOG_TAG=\"libGLESv2\""], |
Pirama Arumuga Nainar | 5d7eb4f | 2019-05-29 15:17:53 -0700 | [diff] [blame] | 255 | |
| 256 | // Bug: http://b/133874658 Disable native_coverage as we investigate a |
| 257 | // crash in surfaceflinger on coverage-enabled cuttlefish builds. |
| 258 | native_coverage: false, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | //############################################################################## |
| 262 | // Build the wrapper OpenGL ES 3.x library (this is just different name for v2) |
| 263 | // |
| 264 | cc_library_shared { |
| 265 | name: "libGLESv3", |
| 266 | defaults: ["gles_libs_defaults"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 267 | llndk: { |
| 268 | symbol_file: "libGLESv3.map.txt", |
Colin Cross | ed0e6e6 | 2021-04-26 17:19:59 -0700 | [diff] [blame] | 269 | export_llndk_headers: ["gl_headers"], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 270 | // Don't export EGL/include from the LLNDK variant. |
| 271 | override_export_include_dirs: [], |
| 272 | }, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 273 | srcs: ["GLES2/gl2.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 274 | cflags: ["-DLOG_TAG=\"libGLESv3\""], |
| 275 | } |