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