blob: b19a862b6c85c27c069826a8335bdbe477fb6f5b [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001// Build the ETC1 library
Bob Badour3306e492021-02-25 15:35:37 -08002package {
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 Willemsen59e086f2016-07-25 17:13:45 -070011cc_library {
12 name: "libETC1",
13 srcs: ["ETC1/etc1.cpp"],
14 host_supported: true,
Spandan Das4a5e3f22022-09-08 21:49:51 +000015 cflags: [
16 "-Wall",
17 "-Werror",
18 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070019
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 Albert49fbff42016-10-03 12:36:00 -070036
Dan Albert7facb1d2016-10-03 12:36:00 -070037// The headers modules are in frameworks/native/opengl/Android.bp.
Dan Albert49fbff42016-10-03 12:36:00 -070038ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070039 name: "libEGL",
Dan Albert49fbff42016-10-03 12:36:00 -070040 symbol_file: "libEGL.map.txt",
41 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080042 unversioned_until: "current",
Dan Albert49fbff42016-10-03 12:36:00 -070043}
Dan Albert7facb1d2016-10-03 12:36:00 -070044
45ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070046 name: "libGLESv1_CM",
Dan Albert7facb1d2016-10-03 12:36:00 -070047 symbol_file: "libGLESv1_CM.map.txt",
48 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080049 unversioned_until: "current",
Dan Albert7facb1d2016-10-03 12:36:00 -070050}
Dan Albert00500c72016-10-03 12:36:00 -070051
52ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070053 name: "libGLESv2",
Dan Albert00500c72016-10-03 12:36:00 -070054 symbol_file: "libGLESv2.map.txt",
55 first_version: "9",
Dan Albertb9c62a62017-01-05 15:58:50 -080056 unversioned_until: "current",
Dan Albert00500c72016-10-03 12:36:00 -070057}
Dan Albertd7d8efa2016-10-03 12:36:00 -070058
59ndk_library {
Dan Willemsen219db6c2017-04-07 15:48:39 -070060 name: "libGLESv3",
Dan Albertd7d8efa2016-10-03 12:36:00 -070061 symbol_file: "libGLESv3.map.txt",
62 first_version: "18",
Dan Albertb9c62a62017-01-05 15:58:50 -080063 unversioned_until: "current",
Dan Albertd7d8efa2016-10-03 12:36:00 -070064}
Dan Willemsena3310632016-10-03 23:56:51 -070065
66cc_defaults {
67 name: "gl_libs_defaults",
68 cflags: [
69 "-DGL_GLEXT_PROTOTYPES",
70 "-DEGL_EGLEXT_PROTOTYPES",
71 "-fvisibility=hidden",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -070072 "-Wall",
73 "-Werror",
74 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -070075 ],
76 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -080077 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
78 // In particular, DO NOT add libutils or anything "above" libcutils
Dan Willemsena3310632016-10-03 23:56:51 -070079 "libcutils",
80 "liblog",
81 "libdl",
82 ],
Jiyong Parka243e5d2017-06-21 12:26:51 +090083 static_libs: [
84 "libarect",
85 ],
86 header_libs: [
Christopher Ferrisddd1d6b2019-09-26 08:27:25 -070087 "bionic_libc_platform_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090088 "gl_headers",
89 "libsystem_headers",
Jiyong Parka243e5d2017-06-21 12:26:51 +090090 "libnativebase_headers",
91 ],
92 export_header_lib_headers: ["gl_headers"],
Dan Willemsena3310632016-10-03 23:56:51 -070093}
94
95//##############################################################################
96// Build META EGL library
97//
98cc_defaults {
99 name: "egl_libs_defaults",
100 defaults: ["gl_libs_defaults"],
101 cflags: [
102 "-DLOG_TAG=\"libEGL\"",
Chih-Hung Hsiehc60a0f02017-10-05 14:25:18 -0700103 "-Wall",
104 "-Werror",
105 "-Wno-error=deprecated-register",
106 "-Wno-error=unknown-attributes",
107 "-Wno-unused-variable",
Dan Willemsena3310632016-10-03 23:56:51 -0700108 ],
109 shared_libs: [
Mathias Agopian5f1af042017-03-09 18:50:05 -0800110 // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
111 // In particular, DO NOT add libutils nor anything "above" libui
Jiyong Park27c39e12017-05-08 13:00:02 +0900112 "libgraphicsenv",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800113 "libnativewindow",
Michael Hoisie4e0f56b2020-04-30 18:40:55 -0400114 "libbase",
Dan Willemsena3310632016-10-03 23:56:51 -0700115 ],
116}
117
118cc_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 Iliev9e7cd072017-10-09 15:56:10 -0400129cc_library_static {
130 name: "libEGL_blobCache",
131 defaults: ["egl_libs_defaults"],
132 srcs: [
133 "EGL/BlobCache.cpp",
134 "EGL/FileBlobCache.cpp",
Cody Northrop6cca6c22023-02-08 20:23:13 -0700135 "EGL/MultifileBlobCache.cpp",
Stan Iliev9e7cd072017-10-09 15:56:10 -0400136 ],
137 export_include_dirs: ["EGL"],
Jisun Lee88a1b762024-10-17 20:12:29 +0900138 shared_libs: [
139 "libz",
140 ],
Stan Iliev9e7cd072017-10-09 15:56:10 -0400141}
142
Dan Willemsena3310632016-10-03 23:56:51 -0700143cc_library_shared {
144 name: "libEGL",
145 defaults: ["egl_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700146 llndk: {
147 symbol_file: "libEGL.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700148 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700149 // Don't export EGL/include from the LLNDK variant.
150 override_export_include_dirs: [],
151 },
Dan Willemsena3310632016-10-03 23:56:51 -0700152 srcs: [
153 "EGL/egl_tls.cpp",
154 "EGL/egl_cache.cpp",
155 "EGL/egl_display.cpp",
156 "EGL/egl_object.cpp",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600157 "EGL/egl_layers.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700158 "EGL/egl.cpp",
Cody Northrop68d10352018-10-15 07:22:09 -0600159 "EGL/eglApi.cpp",
Cody Northrop0ec5d382018-10-15 07:22:07 -0600160 "EGL/egl_platform_entries.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700161 "EGL/Loader.cpp",
Tobin Ehlis96a184d2018-07-18 16:14:07 -0600162 "EGL/egl_angle_platform.cpp",
Dan Willemsena3310632016-10-03 23:56:51 -0700163 ],
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600164 shared_libs: [
165 "libvndksupport",
166 "android.hardware.configstore@1.0",
167 "android.hardware.configstore-utils",
Cody Northrop629ce4e2018-10-15 07:22:09 -0600168 "libbase",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600169 "libhidlbase",
Jiyong Parkbd1ddb22019-02-18 21:22:28 +0900170 "libnativebridge_lazy",
171 "libnativeloader_lazy",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600172 "libutils",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900173 "libSurfaceFlingerProp",
Christopher Ferrisdfb50b42022-03-23 12:37:58 -0700174 "libunwindstack",
Jisun Lee88a1b762024-10-17 20:12:29 +0900175 "libz",
Courtney Goeltzenleuchter1b717022017-07-07 14:55:40 -0600176 ],
Stan Iliev9e7cd072017-10-09 15:56:10 -0400177 static_libs: [
178 "libEGL_getProcAddress",
179 "libEGL_blobCache",
180 ],
Yu Liu1b5902e2022-09-22 12:14:34 -0700181 ldflags: [
182 "-Wl,--exclude-libs=libEGL_getProcAddress.a",
183 "-Wl,--exclude-libs=libEGL_blobCache.a",
184 "-Wl,--Bsymbolic-functions",
185 ],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800186 export_include_dirs: ["EGL/include"],
jorgegil@google.come8141512019-11-21 13:42:16 -0800187 stubs: {
188 symbol_file: "libEGL.map.txt",
189 versions: ["29"],
190 },
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900191 header_libs: ["libsurfaceflinger_headers"],
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800192}
193
194cc_test {
195 name: "libEGL_test",
196 defaults: ["egl_libs_defaults"],
197 srcs: [
198 "EGL/BlobCache.cpp",
199 "EGL/BlobCache_test.cpp",
Cody Northrop999db232023-02-27 17:02:50 -0700200 "EGL/FileBlobCache.cpp",
Cody Northrop6cca6c22023-02-08 20:23:13 -0700201 "EGL/MultifileBlobCache.cpp",
202 "EGL/MultifileBlobCache_test.cpp",
203 ],
204 shared_libs: [
205 "libutils",
Jisun Lee88a1b762024-10-17 20:12:29 +0900206 "libz",
Mathias Agopianb7f9a242017-03-08 22:29:31 -0800207 ],
Dan Willemsena3310632016-10-03 23:56:51 -0700208}
209
210cc_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//
227cc_library_shared {
228 name: "libGLESv1_CM",
229 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700230 llndk: {
231 symbol_file: "libGLESv1_CM.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700232 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700233 // Don't export EGL/include from the LLNDK variant.
234 override_export_include_dirs: [],
235 },
Dan Willemsena3310632016-10-03 23:56:51 -0700236 srcs: ["GLES_CM/gl.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700237 cflags: ["-DLOG_TAG=\"libGLESv1\""],
dimitry0b586e82018-12-11 14:33:30 +0100238 version_script: "libGLESv1_CM.map.txt",
Dan Willemsena3310632016-10-03 23:56:51 -0700239}
240
241//##############################################################################
242// Build the wrapper OpenGL ES 2.x library
243//
244cc_library_shared {
245 name: "libGLESv2",
246 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700247 llndk: {
248 symbol_file: "libGLESv2.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700249 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700250 // Don't export EGL/include from the LLNDK variant.
251 override_export_include_dirs: [],
252 },
Dan Willemsena3310632016-10-03 23:56:51 -0700253 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700254 cflags: ["-DLOG_TAG=\"libGLESv2\""],
Pirama Arumuga Nainar5d7eb4f2019-05-29 15:17:53 -0700255
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 Willemsena3310632016-10-03 23:56:51 -0700259}
260
261//##############################################################################
262// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
263//
264cc_library_shared {
265 name: "libGLESv3",
266 defaults: ["gles_libs_defaults"],
Colin Cross03943642021-04-21 16:47:25 -0700267 llndk: {
268 symbol_file: "libGLESv3.map.txt",
Colin Crossed0e6e62021-04-26 17:19:59 -0700269 export_llndk_headers: ["gl_headers"],
Colin Cross03943642021-04-21 16:47:25 -0700270 // Don't export EGL/include from the LLNDK variant.
271 override_export_include_dirs: [],
272 },
Dan Willemsena3310632016-10-03 23:56:51 -0700273 srcs: ["GLES2/gl2.cpp"],
Dan Willemsena3310632016-10-03 23:56:51 -0700274 cflags: ["-DLOG_TAG=\"libGLESv3\""],
275}