blob: 16de3908f809a39e4f74b2a4beea443cf4859520 [file] [log] [blame]
// Build the ETC1 library
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_native_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_native_license"],
}
cc_library {
name: "libETC1",
srcs: ["ETC1/etc1.cpp"],
host_supported: true,
cflags: [
"-Wall",
"-Werror",
],
target: {
android: {
static: {
enabled: false,
},
},
host: {
shared: {
enabled: false,
},
},
windows: {
enabled: true,
},
},
}
// The headers modules are in frameworks/native/opengl/Android.bp.
ndk_library {
name: "libEGL",
symbol_file: "libEGL.map.txt",
first_version: "9",
unversioned_until: "current",
export_header_libs: [
"libEGL_headers",
],
}
ndk_library {
name: "libGLESv1_CM",
symbol_file: "libGLESv1_CM.map.txt",
first_version: "9",
unversioned_until: "current",
export_header_libs: [
"libGLESv1_CM_headers",
],
}
ndk_library {
name: "libGLESv2",
symbol_file: "libGLESv2.map.txt",
first_version: "9",
unversioned_until: "current",
export_header_libs: [
"libGLESv2_headers",
],
}
ndk_library {
name: "libGLESv3",
symbol_file: "libGLESv3.map.txt",
first_version: "18",
unversioned_until: "current",
export_header_libs: [
"libGLESv3_headers",
],
}
cc_defaults {
name: "gl_libs_defaults",
cflags: [
"-DGL_GLEXT_PROTOTYPES",
"-DEGL_EGLEXT_PROTOTYPES",
"-fvisibility=hidden",
"-Wall",
"-Werror",
"-Wno-unused-variable",
],
shared_libs: [
// ***** DO NOT ADD NEW DEPENDENCIES HERE *****
// In particular, DO NOT add libutils or anything "above" libcutils
"libcutils",
"liblog",
"libdl",
],
static_libs: [
"libarect",
],
header_libs: [
"bionic_libc_platform_headers",
"gl_headers",
"libsystem_headers",
"libnativebase_headers",
],
export_header_lib_headers: ["gl_headers"],
}
//##############################################################################
// Build META EGL library
//
cc_defaults {
name: "egl_libs_defaults",
defaults: ["gl_libs_defaults"],
cflags: [
"-DLOG_TAG=\"libEGL\"",
"-Wall",
"-Werror",
"-Wno-error=deprecated-register",
"-Wno-error=unknown-attributes",
"-Wno-unused-variable",
],
shared_libs: [
// ***** DO NOT ADD NEW DEPENDENCIES HERE *****
// In particular, DO NOT add libutils nor anything "above" libui
"libgraphicsenv",
"libnativewindow",
"libbase",
],
}
cc_library_static {
name: "libEGL_getProcAddress",
defaults: ["egl_libs_defaults"],
srcs: ["EGL/getProcAddress.cpp"],
arch: {
arm: {
instruction_set: "arm",
},
},
}
cc_library_static {
name: "libEGL_blobCache",
defaults: ["egl_libs_defaults"],
srcs: [
"EGL/BlobCache.cpp",
"EGL/FileBlobCache.cpp",
"EGL/MultifileBlobCache.cpp",
],
export_include_dirs: ["EGL"],
}
cc_library_shared {
name: "libEGL",
defaults: ["egl_libs_defaults"],
llndk: {
symbol_file: "libEGL.map.txt",
export_llndk_headers: ["gl_headers"],
// Don't export EGL/include from the LLNDK variant.
override_export_include_dirs: [],
},
srcs: [
"EGL/egl_tls.cpp",
"EGL/egl_cache.cpp",
"EGL/egl_display.cpp",
"EGL/egl_object.cpp",
"EGL/egl_layers.cpp",
"EGL/egl.cpp",
"EGL/eglApi.cpp",
"EGL/egl_platform_entries.cpp",
"EGL/Loader.cpp",
"EGL/egl_angle_platform.cpp",
],
shared_libs: [
"libvndksupport",
"android.hardware.configstore@1.0",
"android.hardware.configstore-utils",
"libbase",
"libhidlbase",
"libnativebridge_lazy",
"libnativeloader_lazy",
"libutils",
"libSurfaceFlingerProp",
"libunwindstack",
],
static_libs: [
"libEGL_getProcAddress",
"libEGL_blobCache",
],
ldflags: [
"-Wl,--exclude-libs=libEGL_getProcAddress.a",
"-Wl,--exclude-libs=libEGL_blobCache.a",
"-Wl,--Bsymbolic-functions",
],
export_include_dirs: ["EGL/include"],
stubs: {
symbol_file: "libEGL.map.txt",
versions: ["29"],
},
header_libs: ["libsurfaceflinger_headers"],
}
cc_test {
name: "libEGL_test",
defaults: ["egl_libs_defaults"],
srcs: [
"EGL/BlobCache.cpp",
"EGL/BlobCache_test.cpp",
"EGL/FileBlobCache.cpp",
"EGL/MultifileBlobCache.cpp",
"EGL/MultifileBlobCache_test.cpp",
],
shared_libs: [
"libutils",
],
}
cc_defaults {
name: "gles_libs_defaults",
defaults: ["gl_libs_defaults"],
arch: {
arm: {
instruction_set: "arm",
// TODO: This is to work around b/20093774. Remove after root cause is fixed
ldflags: ["-Wl,--hash-style,both"],
},
},
shared_libs: ["libEGL"],
}
//##############################################################################
// Build the wrapper OpenGL ES 1.x library
//
cc_library_shared {
name: "libGLESv1_CM",
defaults: ["gles_libs_defaults"],
llndk: {
symbol_file: "libGLESv1_CM.map.txt",
export_llndk_headers: ["gl_headers"],
// Don't export EGL/include from the LLNDK variant.
override_export_include_dirs: [],
},
srcs: ["GLES_CM/gl.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv1\""],
version_script: "libGLESv1_CM.map.txt",
}
//##############################################################################
// Build the wrapper OpenGL ES 2.x library
//
cc_library_shared {
name: "libGLESv2",
defaults: ["gles_libs_defaults"],
llndk: {
symbol_file: "libGLESv2.map.txt",
export_llndk_headers: ["gl_headers"],
// Don't export EGL/include from the LLNDK variant.
override_export_include_dirs: [],
},
srcs: ["GLES2/gl2.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv2\""],
// Bug: http://b/133874658 Disable native_coverage as we investigate a
// crash in surfaceflinger on coverage-enabled cuttlefish builds.
native_coverage: false,
}
//##############################################################################
// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
//
cc_library_shared {
name: "libGLESv3",
defaults: ["gles_libs_defaults"],
llndk: {
symbol_file: "libGLESv3.map.txt",
export_llndk_headers: ["gl_headers"],
// Don't export EGL/include from the LLNDK variant.
override_export_include_dirs: [],
},
srcs: ["GLES2/gl2.cpp"],
cflags: ["-DLOG_TAG=\"libGLESv3\""],
}