blob: 3fa1311ce9df8bc739bcd9f1fd72f589b8a6a7f2 [file] [log] [blame]
Lloyd Pique66ce40d2018-01-23 16:42:19 -08001cc_defaults {
2 name: "surfaceflinger_defaults",
3 cflags: [
4 "-DLOG_TAG=\"SurfaceFlinger\"",
5 "-Wall",
6 "-Werror",
Lloyd Pique755e3192018-01-31 16:46:15 -08007 "-Wthread-safety",
Lloyd Pique66ce40d2018-01-23 16:42:19 -08008 "-Wunused",
9 "-Wunreachable-code",
10 ],
11 cppflags: ["-std=c++1z"],
12}
13
14cc_defaults {
15 name: "libsurfaceflinger_defaults",
16 defaults: ["surfaceflinger_defaults"],
17 cflags: [
18 "-DGL_GLEXT_PROTOTYPES",
19 "-DEGL_EGLEXT_PROTOTYPES",
20 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080021 shared_libs: [
22 "android.frameworks.vr.composer@1.0",
23 "android.hardware.configstore-utils",
24 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080025 "android.hardware.configstore@1.1",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080026 "android.hardware.graphics.allocator@2.0",
27 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070028 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070029 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080030 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010031 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "libbase",
33 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080034 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080035 "libcutils",
36 "libdl",
37 "libEGL",
38 "libfmq",
39 "libGLESv1_CM",
40 "libGLESv2",
41 "libgui",
42 "libhardware",
43 "libhidlbase",
44 "libhidltransport",
45 "libhwbinder",
46 "liblayers_proto",
47 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080048 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080049 "libprotobuf-cpp-lite",
50 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070051 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 "libui",
53 "libutils",
54 "libvulkan",
55 ],
56 static_libs: [
57 "libserviceutils",
58 "libtrace_proto",
59 "libvkjson",
60 "libvr_manager",
61 "libvrflinger",
62 ],
63 header_libs: [
64 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070065 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080066 ],
67 export_static_lib_headers: [
68 "libserviceutils",
69 ],
70 export_shared_lib_headers: [
71 "android.hardware.graphics.allocator@2.0",
72 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070073 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070074 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010075 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080076 "libhidlbase",
77 "libhidltransport",
78 "libhwbinder",
79 ],
80}
81
82cc_library_headers {
83 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080084 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080085 static_libs: ["libserviceutils"],
86 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080087}
Kalle Raitaa099a242017-01-11 11:17:29 -080088
Lloyd Pique66ce40d2018-01-23 16:42:19 -080089filegroup {
90 name: "libsurfaceflinger_sources",
91 srcs: [
92 "BufferLayer.cpp",
93 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -070094 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -070095 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080096 "Client.cpp",
97 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080098 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080099 "DisplayDevice.cpp",
100 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700101 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800102 "DisplayHardware/FramebufferSurface.cpp",
103 "DisplayHardware/HWC2.cpp",
104 "DisplayHardware/HWComposer.cpp",
105 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100106 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107 "DisplayHardware/VirtualDisplaySurface.cpp",
108 "DispSync.cpp",
109 "Effects/Daltonizer.cpp",
110 "EventControlThread.cpp",
111 "EventLog/EventLog.cpp",
112 "EventThread.cpp",
113 "FrameTracker.cpp",
114 "GpuService.cpp",
115 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700116 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800117 "LayerProtoHelper.cpp",
118 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800119 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800120 "LayerVector.cpp",
121 "MessageQueue.cpp",
122 "MonitoredProducer.cpp",
123 "RenderArea.cpp",
124 "RenderEngine/Description.cpp",
125 "RenderEngine/GLES20RenderEngine.cpp",
126 "RenderEngine/GLExtensions.cpp",
127 "RenderEngine/Image.cpp",
128 "RenderEngine/Mesh.cpp",
129 "RenderEngine/Program.cpp",
130 "RenderEngine/ProgramCache.cpp",
131 "RenderEngine/RenderEngine.cpp",
132 "RenderEngine/Surface.cpp",
133 "RenderEngine/Texture.cpp",
134 "StartPropertySetThread.cpp",
135 "SurfaceFlinger.cpp",
136 "SurfaceInterceptor.cpp",
137 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700138 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "Transform.cpp",
140 ],
141}
142
143cc_library_shared {
144 name: "libsurfaceflinger",
145 defaults: ["libsurfaceflinger_defaults"],
146 cflags: [
147 "-fvisibility=hidden",
148 "-Werror=format",
149 ],
150 srcs: [
151 ":libsurfaceflinger_sources",
152 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800153 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800154 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700155 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800156 "frameworks/native/vulkan/include",
157 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800158 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800159 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800160 ],
161 lto: {
162 thin: true,
163 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800164}
165
166cc_binary {
167 name: "surfaceflinger",
168 defaults: ["surfaceflinger_defaults"],
169 init_rc: ["surfaceflinger.rc"],
170 srcs: ["main_surfaceflinger.cpp"],
171 whole_static_libs: [
172 "libsigchain",
173 ],
174 shared_libs: [
175 "android.frameworks.displayservice@1.0",
176 "android.hardware.configstore-utils",
177 "android.hardware.configstore@1.0",
178 "android.hardware.graphics.allocator@2.0",
179 "libbinder",
180 "libcutils",
181 "libdisplayservicehidl",
182 "libhidlbase",
183 "libhidltransport",
184 "liblayers_proto",
185 "liblog",
186 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700187 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800188 "libutils",
189 ],
190 static_libs: [
191 "libserviceutils",
192 "libtrace_proto",
193 ],
194 ldflags: ["-Wl,--export-dynamic"],
195
196 // TODO(b/71715793): These version-scripts are required due to the use of
197 // whole_static_libs to pull in libsigchain. To work, the files had to be
198 // locally duplicated from their original location
199 // $ANDROID_ROOT/art/sigchainlib/
200 multilib: {
201 lib32: {
202 version_script: "version-script32.txt",
203 },
204 lib64: {
205 version_script: "version-script64.txt",
206 },
207 },
208}
209
210cc_library_shared {
211 name: "libsurfaceflinger_ddmconnection",
212 defaults: ["surfaceflinger_defaults"],
213 srcs: ["DdmConnection.cpp"],
214 shared_libs: [
215 "libcutils",
216 "libdl",
217 "liblog",
218 ],
219 product_variables: {
220 // uses jni which may not be available in PDK
221 pdk: {
222 enabled: false,
223 },
224 },
225}
226
227subdirs = [
228 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700229 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800230 "tests",
231]