blob: c2bb6ad6b4a9867a5b6ea00c217cf2316f5ef5e9 [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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080029 "android.hardware.power@1.0",
30 "libbase",
31 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080032 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080033 "libcutils",
34 "libdl",
35 "libEGL",
36 "libfmq",
37 "libGLESv1_CM",
38 "libGLESv2",
39 "libgui",
40 "libhardware",
41 "libhidlbase",
42 "libhidltransport",
43 "libhwbinder",
44 "liblayers_proto",
45 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080046 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080047 "libprotobuf-cpp-lite",
48 "libsync",
Yiwei Zhang0102ad22018-05-02 17:37:17 -070049 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080050 "libui",
51 "libutils",
52 "libvulkan",
53 ],
54 static_libs: [
55 "libserviceutils",
56 "libtrace_proto",
57 "libvkjson",
58 "libvr_manager",
59 "libvrflinger",
60 ],
61 header_libs: [
62 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070063 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080064 ],
65 export_static_lib_headers: [
66 "libserviceutils",
67 ],
68 export_shared_lib_headers: [
69 "android.hardware.graphics.allocator@2.0",
70 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070071 "android.hardware.graphics.composer@2.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080072 "libhidlbase",
73 "libhidltransport",
74 "libhwbinder",
75 ],
76}
77
78cc_library_headers {
79 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080080 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080081 static_libs: ["libserviceutils"],
82 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080083}
Kalle Raitaa099a242017-01-11 11:17:29 -080084
Lloyd Pique66ce40d2018-01-23 16:42:19 -080085filegroup {
86 name: "libsurfaceflinger_sources",
87 srcs: [
88 "BufferLayer.cpp",
89 "BufferLayerConsumer.cpp",
90 "Client.cpp",
91 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080092 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080093 "DisplayDevice.cpp",
94 "DisplayHardware/ComposerHal.cpp",
95 "DisplayHardware/FramebufferSurface.cpp",
96 "DisplayHardware/HWC2.cpp",
97 "DisplayHardware/HWComposer.cpp",
98 "DisplayHardware/HWComposerBufferCache.cpp",
99 "DisplayHardware/VirtualDisplaySurface.cpp",
100 "DispSync.cpp",
101 "Effects/Daltonizer.cpp",
102 "EventControlThread.cpp",
103 "EventLog/EventLog.cpp",
104 "EventThread.cpp",
105 "FrameTracker.cpp",
106 "GpuService.cpp",
107 "Layer.cpp",
108 "LayerProtoHelper.cpp",
109 "LayerRejecter.cpp",
Yiwei Zhang068e31b2018-02-21 13:02:45 -0800110 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800111 "LayerVector.cpp",
112 "MessageQueue.cpp",
113 "MonitoredProducer.cpp",
114 "RenderArea.cpp",
115 "RenderEngine/Description.cpp",
116 "RenderEngine/GLES20RenderEngine.cpp",
117 "RenderEngine/GLExtensions.cpp",
118 "RenderEngine/Image.cpp",
119 "RenderEngine/Mesh.cpp",
120 "RenderEngine/Program.cpp",
121 "RenderEngine/ProgramCache.cpp",
122 "RenderEngine/RenderEngine.cpp",
123 "RenderEngine/Surface.cpp",
124 "RenderEngine/Texture.cpp",
125 "StartPropertySetThread.cpp",
126 "SurfaceFlinger.cpp",
127 "SurfaceInterceptor.cpp",
128 "SurfaceTracing.cpp",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700129 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "Transform.cpp",
131 ],
132}
133
134cc_library_shared {
135 name: "libsurfaceflinger",
136 defaults: ["libsurfaceflinger_defaults"],
137 cflags: [
138 "-fvisibility=hidden",
139 "-Werror=format",
140 ],
141 srcs: [
142 ":libsurfaceflinger_sources",
143 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800144 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800145 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700146 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800147 "frameworks/native/vulkan/include",
148 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800149 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800150 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800151 ],
152 lto: {
153 thin: true,
154 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800155}
156
157cc_binary {
158 name: "surfaceflinger",
159 defaults: ["surfaceflinger_defaults"],
160 init_rc: ["surfaceflinger.rc"],
161 srcs: ["main_surfaceflinger.cpp"],
162 whole_static_libs: [
163 "libsigchain",
164 ],
165 shared_libs: [
166 "android.frameworks.displayservice@1.0",
167 "android.hardware.configstore-utils",
168 "android.hardware.configstore@1.0",
169 "android.hardware.graphics.allocator@2.0",
170 "libbinder",
171 "libcutils",
172 "libdisplayservicehidl",
173 "libhidlbase",
174 "libhidltransport",
175 "liblayers_proto",
176 "liblog",
177 "libsurfaceflinger",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700178 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800179 "libutils",
180 ],
181 static_libs: [
182 "libserviceutils",
183 "libtrace_proto",
184 ],
185 ldflags: ["-Wl,--export-dynamic"],
186
187 // TODO(b/71715793): These version-scripts are required due to the use of
188 // whole_static_libs to pull in libsigchain. To work, the files had to be
189 // locally duplicated from their original location
190 // $ANDROID_ROOT/art/sigchainlib/
191 multilib: {
192 lib32: {
193 version_script: "version-script32.txt",
194 },
195 lib64: {
196 version_script: "version-script64.txt",
197 },
198 },
199}
200
201cc_library_shared {
202 name: "libsurfaceflinger_ddmconnection",
203 defaults: ["surfaceflinger_defaults"],
204 srcs: ["DdmConnection.cpp"],
205 shared_libs: [
206 "libcutils",
207 "libdl",
208 "liblog",
209 ],
210 product_variables: {
211 // uses jni which may not be available in PDK
212 pdk: {
213 enabled: false,
214 },
215 },
216}
217
218subdirs = [
219 "layerproto",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700220 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800221 "tests",
222]