blob: 05535a520da907f9358ba86b21993f72eefca8df [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",
Peiyong Lin13effd12018-07-24 17:01:47 -070026 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080027 "android.hardware.graphics.allocator@2.0",
28 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070029 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070030 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080031 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010032 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080033 "libbase",
34 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080035 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080036 "libcutils",
37 "libdl",
38 "libEGL",
39 "libfmq",
40 "libGLESv1_CM",
41 "libGLESv2",
42 "libgui",
43 "libhardware",
44 "libhidlbase",
45 "libhidltransport",
46 "libhwbinder",
47 "liblayers_proto",
48 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080049 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080050 "libprotobuf-cpp-lite",
51 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070052 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 "libui",
54 "libutils",
55 "libvulkan",
56 ],
57 static_libs: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070058 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080059 "libserviceutils",
60 "libtrace_proto",
61 "libvkjson",
62 "libvr_manager",
63 "libvrflinger",
64 ],
65 header_libs: [
66 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070067 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080068 ],
69 export_static_lib_headers: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070070 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080071 "libserviceutils",
72 ],
73 export_shared_lib_headers: [
74 "android.hardware.graphics.allocator@2.0",
75 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070076 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070077 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010078 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080079 "libhidlbase",
80 "libhidltransport",
81 "libhwbinder",
82 ],
83}
84
85cc_library_headers {
86 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080087 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080088 static_libs: ["libserviceutils"],
89 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080090}
Kalle Raitaa099a242017-01-11 11:17:29 -080091
Lloyd Pique66ce40d2018-01-23 16:42:19 -080092filegroup {
93 name: "libsurfaceflinger_sources",
94 srcs: [
95 "BufferLayer.cpp",
96 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -070097 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -070098 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080099 "Client.cpp",
100 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800101 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800102 "DisplayDevice.cpp",
103 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700104 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800105 "DisplayHardware/FramebufferSurface.cpp",
106 "DisplayHardware/HWC2.cpp",
107 "DisplayHardware/HWComposer.cpp",
108 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100109 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800111 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800112 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800113 "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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800121 "MonitoredProducer.cpp",
122 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700123 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700124 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700125 "Scheduler/EventControlThread.cpp",
126 "Scheduler/EventThread.cpp",
127 "Scheduler/MessageQueue.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800128 "StartPropertySetThread.cpp",
129 "SurfaceFlinger.cpp",
130 "SurfaceInterceptor.cpp",
131 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700132 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 ],
134}
135
136cc_library_shared {
137 name: "libsurfaceflinger",
138 defaults: ["libsurfaceflinger_defaults"],
139 cflags: [
140 "-fvisibility=hidden",
141 "-Werror=format",
142 ],
143 srcs: [
144 ":libsurfaceflinger_sources",
145 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800146 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800147 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700148 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800149 "frameworks/native/vulkan/include",
150 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800151 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800152 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800153 ],
154 lto: {
155 thin: true,
156 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800157}
158
159cc_binary {
160 name: "surfaceflinger",
161 defaults: ["surfaceflinger_defaults"],
162 init_rc: ["surfaceflinger.rc"],
163 srcs: ["main_surfaceflinger.cpp"],
164 whole_static_libs: [
165 "libsigchain",
166 ],
167 shared_libs: [
168 "android.frameworks.displayservice@1.0",
169 "android.hardware.configstore-utils",
170 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700171 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800172 "android.hardware.graphics.allocator@2.0",
173 "libbinder",
174 "libcutils",
175 "libdisplayservicehidl",
176 "libhidlbase",
177 "libhidltransport",
178 "liblayers_proto",
179 "liblog",
180 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700181 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800182 "libutils",
183 ],
184 static_libs: [
185 "libserviceutils",
186 "libtrace_proto",
187 ],
188 ldflags: ["-Wl,--export-dynamic"],
189
190 // TODO(b/71715793): These version-scripts are required due to the use of
191 // whole_static_libs to pull in libsigchain. To work, the files had to be
192 // locally duplicated from their original location
193 // $ANDROID_ROOT/art/sigchainlib/
194 multilib: {
195 lib32: {
196 version_script: "version-script32.txt",
197 },
198 lib64: {
199 version_script: "version-script64.txt",
200 },
201 },
202}
203
204cc_library_shared {
205 name: "libsurfaceflinger_ddmconnection",
206 defaults: ["surfaceflinger_defaults"],
207 srcs: ["DdmConnection.cpp"],
208 shared_libs: [
209 "libcutils",
210 "libdl",
211 "liblog",
212 ],
213 product_variables: {
214 // uses jni which may not be available in PDK
215 pdk: {
216 enabled: false,
217 },
218 },
219}
220
221subdirs = [
222 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700223 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800224 "tests",
225]