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: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 23 | "libcutils", |
| 24 | "libEGL", |
| 25 | "libGLESv1_CM", |
| 26 | "libGLESv2", |
| 27 | "libgui", |
| 28 | "liblog", |
Peiyong Lin | 46080ef | 2018-10-26 18:43:14 -0700 | [diff] [blame^] | 29 | "libnativewindow", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 30 | "libui", |
| 31 | "libutils", |
| 32 | ], |
| 33 | local_include_dirs: ["include"], |
| 34 | export_include_dirs: ["include"], |
| 35 | } |
| 36 | |
| 37 | filegroup { |
| 38 | name: "librenderengine_sources", |
| 39 | srcs: [ |
| 40 | "Description.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 41 | "Mesh.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 42 | "RenderEngine.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 43 | "Texture.cpp", |
| 44 | ], |
| 45 | } |
| 46 | |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 47 | filegroup { |
| 48 | name: "librenderengine_gl_sources", |
| 49 | srcs: [ |
| 50 | "gl/GLES20RenderEngine.cpp", |
| 51 | "gl/GLExtensions.cpp", |
Peiyong Lin | e5a9a7f | 2018-08-30 15:32:13 -0700 | [diff] [blame] | 52 | "gl/GLFramebuffer.cpp", |
Peiyong Lin | f1bada9 | 2018-08-29 09:39:31 -0700 | [diff] [blame] | 53 | "gl/GLImage.cpp", |
| 54 | "gl/GLSurface.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 55 | "gl/Program.cpp", |
| 56 | "gl/ProgramCache.cpp", |
| 57 | ], |
| 58 | } |
| 59 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 60 | cc_library_static { |
| 61 | name: "librenderengine", |
| 62 | defaults: ["librenderengine_defaults"], |
| 63 | double_loadable: true, |
| 64 | |
| 65 | clang: true, |
| 66 | cflags: [ |
| 67 | "-fvisibility=hidden", |
| 68 | "-Werror=format", |
| 69 | ], |
| 70 | cppflags: [ |
| 71 | "-fwhole-program-vtables", // requires ThinLTO |
| 72 | ], |
| 73 | srcs: [ |
| 74 | ":librenderengine_sources", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 75 | ":librenderengine_gl_sources", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 76 | ], |
| 77 | lto: { |
| 78 | thin: true, |
| 79 | }, |
| 80 | } |