Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 1 | // TODO(b/112585051) Add to VNDK once moved to libs/ |
| 2 | cc_defaults { |
| 3 | name: "renderengine_defaults", |
| 4 | cflags: [ |
| 5 | "-DLOG_TAG=\"RenderEngine\"", |
| 6 | "-Wall", |
| 7 | "-Werror", |
| 8 | "-Wthread-safety", |
| 9 | "-Wunused", |
| 10 | "-Wunreachable-code", |
| 11 | ], |
| 12 | cppflags: ["-std=c++1z"], |
| 13 | } |
| 14 | |
| 15 | cc_defaults { |
| 16 | name: "librenderengine_defaults", |
| 17 | defaults: ["renderengine_defaults"], |
| 18 | cflags: [ |
| 19 | "-DGL_GLEXT_PROTOTYPES", |
| 20 | "-DEGL_EGLEXT_PROTOTYPES", |
| 21 | ], |
| 22 | shared_libs: [ |
| 23 | "android.hardware.configstore-utils", |
| 24 | "android.hardware.configstore@1.0", |
| 25 | "android.hardware.configstore@1.1", |
| 26 | "android.hardware.configstore@1.2", |
| 27 | "libcutils", |
| 28 | "libEGL", |
| 29 | "libGLESv1_CM", |
| 30 | "libGLESv2", |
| 31 | "libgui", |
| 32 | "liblog", |
| 33 | "libui", |
| 34 | "libutils", |
| 35 | ], |
| 36 | local_include_dirs: ["include"], |
| 37 | export_include_dirs: ["include"], |
| 38 | } |
| 39 | |
| 40 | filegroup { |
| 41 | name: "librenderengine_sources", |
| 42 | srcs: [ |
| 43 | "Description.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 44 | "Mesh.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 45 | "RenderEngine.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 46 | "Texture.cpp", |
| 47 | ], |
| 48 | } |
| 49 | |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 50 | filegroup { |
| 51 | name: "librenderengine_gl_sources", |
| 52 | srcs: [ |
| 53 | "gl/GLES20RenderEngine.cpp", |
| 54 | "gl/GLExtensions.cpp", |
Peiyong Lin | f1bada9 | 2018-08-29 09:39:31 -0700 | [diff] [blame^] | 55 | "gl/GLImage.cpp", |
| 56 | "gl/GLSurface.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 57 | "gl/Program.cpp", |
| 58 | "gl/ProgramCache.cpp", |
| 59 | ], |
| 60 | } |
| 61 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 62 | cc_library_static { |
| 63 | name: "librenderengine", |
| 64 | defaults: ["librenderengine_defaults"], |
| 65 | double_loadable: true, |
| 66 | |
| 67 | clang: true, |
| 68 | cflags: [ |
| 69 | "-fvisibility=hidden", |
| 70 | "-Werror=format", |
| 71 | ], |
| 72 | cppflags: [ |
| 73 | "-fwhole-program-vtables", // requires ThinLTO |
| 74 | ], |
| 75 | srcs: [ |
| 76 | ":librenderengine_sources", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 77 | ":librenderengine_gl_sources", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 78 | ], |
| 79 | lto: { |
| 80 | thin: true, |
| 81 | }, |
| 82 | } |