blob: b91971027b20ca8e4a04e47d84363a3a41eff958 [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",
94 "Client.cpp",
95 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080096 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080097 "DisplayDevice.cpp",
98 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070099 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800100 "DisplayHardware/FramebufferSurface.cpp",
101 "DisplayHardware/HWC2.cpp",
102 "DisplayHardware/HWComposer.cpp",
103 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100104 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800105 "DisplayHardware/VirtualDisplaySurface.cpp",
106 "DispSync.cpp",
107 "Effects/Daltonizer.cpp",
108 "EventControlThread.cpp",
109 "EventLog/EventLog.cpp",
110 "EventThread.cpp",
111 "FrameTracker.cpp",
112 "GpuService.cpp",
113 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700114 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800115 "LayerProtoHelper.cpp",
116 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800117 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800118 "LayerVector.cpp",
119 "MessageQueue.cpp",
120 "MonitoredProducer.cpp",
121 "RenderArea.cpp",
122 "RenderEngine/Description.cpp",
123 "RenderEngine/GLES20RenderEngine.cpp",
124 "RenderEngine/GLExtensions.cpp",
125 "RenderEngine/Image.cpp",
126 "RenderEngine/Mesh.cpp",
127 "RenderEngine/Program.cpp",
128 "RenderEngine/ProgramCache.cpp",
129 "RenderEngine/RenderEngine.cpp",
130 "RenderEngine/Surface.cpp",
131 "RenderEngine/Texture.cpp",
132 "StartPropertySetThread.cpp",
133 "SurfaceFlinger.cpp",
134 "SurfaceInterceptor.cpp",
135 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700136 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "Transform.cpp",
138 ],
139}
140
141cc_library_shared {
142 name: "libsurfaceflinger",
143 defaults: ["libsurfaceflinger_defaults"],
144 cflags: [
145 "-fvisibility=hidden",
146 "-Werror=format",
147 ],
148 srcs: [
149 ":libsurfaceflinger_sources",
150 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800151 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800152 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700153 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800154 "frameworks/native/vulkan/include",
155 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800156 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800157 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800158 ],
159 lto: {
160 thin: true,
161 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800162}
163
164cc_binary {
165 name: "surfaceflinger",
166 defaults: ["surfaceflinger_defaults"],
167 init_rc: ["surfaceflinger.rc"],
168 srcs: ["main_surfaceflinger.cpp"],
169 whole_static_libs: [
170 "libsigchain",
171 ],
172 shared_libs: [
173 "android.frameworks.displayservice@1.0",
174 "android.hardware.configstore-utils",
175 "android.hardware.configstore@1.0",
176 "android.hardware.graphics.allocator@2.0",
177 "libbinder",
178 "libcutils",
179 "libdisplayservicehidl",
180 "libhidlbase",
181 "libhidltransport",
182 "liblayers_proto",
183 "liblog",
184 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700185 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800186 "libutils",
187 ],
188 static_libs: [
189 "libserviceutils",
190 "libtrace_proto",
191 ],
192 ldflags: ["-Wl,--export-dynamic"],
193
194 // TODO(b/71715793): These version-scripts are required due to the use of
195 // whole_static_libs to pull in libsigchain. To work, the files had to be
196 // locally duplicated from their original location
197 // $ANDROID_ROOT/art/sigchainlib/
198 multilib: {
199 lib32: {
200 version_script: "version-script32.txt",
201 },
202 lib64: {
203 version_script: "version-script64.txt",
204 },
205 },
206}
207
208cc_library_shared {
209 name: "libsurfaceflinger_ddmconnection",
210 defaults: ["surfaceflinger_defaults"],
211 srcs: ["DdmConnection.cpp"],
212 shared_libs: [
213 "libcutils",
214 "libdl",
215 "liblog",
216 ],
217 product_variables: {
218 // uses jni which may not be available in PDK
219 pdk: {
220 enabled: false,
221 },
222 },
223}
224
225subdirs = [
226 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700227 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800228 "tests",
229]