Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "renderengine_defaults", |
| 3 | cflags: [ |
| 4 | "-DLOG_TAG=\"RenderEngine\"", |
| 5 | "-Wall", |
| 6 | "-Werror", |
| 7 | "-Wthread-safety", |
| 8 | "-Wunused", |
| 9 | "-Wunreachable-code", |
| 10 | ], |
| 11 | cppflags: ["-std=c++1z"], |
| 12 | } |
| 13 | |
| 14 | cc_defaults { |
| 15 | name: "librenderengine_defaults", |
| 16 | defaults: ["renderengine_defaults"], |
| 17 | cflags: [ |
| 18 | "-DGL_GLEXT_PROTOTYPES", |
| 19 | "-DEGL_EGLEXT_PROTOTYPES", |
| 20 | ], |
| 21 | shared_libs: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 22 | "libcutils", |
| 23 | "libEGL", |
| 24 | "libGLESv1_CM", |
| 25 | "libGLESv2", |
| 26 | "libgui", |
| 27 | "liblog", |
Peiyong Lin | 46080ef | 2018-10-26 18:43:14 -0700 | [diff] [blame] | 28 | "libnativewindow", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 29 | "libui", |
| 30 | "libutils", |
| 31 | ], |
| 32 | local_include_dirs: ["include"], |
| 33 | export_include_dirs: ["include"], |
| 34 | } |
| 35 | |
| 36 | filegroup { |
| 37 | name: "librenderengine_sources", |
| 38 | srcs: [ |
| 39 | "Description.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 40 | "Mesh.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 41 | "RenderEngine.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 42 | "Texture.cpp", |
| 43 | ], |
| 44 | } |
| 45 | |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 46 | filegroup { |
| 47 | name: "librenderengine_gl_sources", |
| 48 | srcs: [ |
| 49 | "gl/GLES20RenderEngine.cpp", |
| 50 | "gl/GLExtensions.cpp", |
Peiyong Lin | e5a9a7f | 2018-08-30 15:32:13 -0700 | [diff] [blame] | 51 | "gl/GLFramebuffer.cpp", |
Peiyong Lin | f1bada9 | 2018-08-29 09:39:31 -0700 | [diff] [blame] | 52 | "gl/GLImage.cpp", |
Alec Mouri | f1d19c7 | 2018-11-15 00:00:50 +0000 | [diff] [blame^] | 53 | "gl/GLSurface.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 54 | "gl/Program.cpp", |
| 55 | "gl/ProgramCache.cpp", |
| 56 | ], |
| 57 | } |
| 58 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 59 | cc_library_static { |
| 60 | name: "librenderengine", |
| 61 | defaults: ["librenderengine_defaults"], |
Peiyong Lin | 338ea4f | 2018-11-03 17:04:37 -0700 | [diff] [blame] | 62 | vendor_available: true, |
| 63 | vndk: { |
| 64 | enabled: true, |
| 65 | }, |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 66 | double_loadable: true, |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 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 | } |