blob: 1f0562da678e7b3962e0b75f5c9bd241833e1675 [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",
25 "android.hardware.graphics.allocator@2.0",
26 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070027 "android.hardware.graphics.composer@2.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080028 "android.hardware.power@1.0",
29 "libbase",
30 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080031 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "libcutils",
33 "libdl",
34 "libEGL",
35 "libfmq",
36 "libGLESv1_CM",
37 "libGLESv2",
38 "libgui",
39 "libhardware",
40 "libhidlbase",
41 "libhidltransport",
42 "libhwbinder",
43 "liblayers_proto",
44 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080045 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080046 "libprotobuf-cpp-lite",
47 "libsync",
48 "libui",
49 "libutils",
50 "libvulkan",
51 ],
52 static_libs: [
53 "libserviceutils",
54 "libtrace_proto",
55 "libvkjson",
56 "libvr_manager",
57 "libvrflinger",
58 ],
59 header_libs: [
60 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070061 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080062 ],
63 export_static_lib_headers: [
64 "libserviceutils",
65 ],
66 export_shared_lib_headers: [
67 "android.hardware.graphics.allocator@2.0",
68 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070069 "android.hardware.graphics.composer@2.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080070 "libhidlbase",
71 "libhidltransport",
72 "libhwbinder",
73 ],
74}
75
76cc_library_headers {
77 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080078 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080079 static_libs: ["libserviceutils"],
80 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080081}
Kalle Raitaa099a242017-01-11 11:17:29 -080082
Lloyd Pique66ce40d2018-01-23 16:42:19 -080083filegroup {
84 name: "libsurfaceflinger_sources",
85 srcs: [
86 "BufferLayer.cpp",
87 "BufferLayerConsumer.cpp",
88 "Client.cpp",
89 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080090 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080091 "DisplayDevice.cpp",
92 "DisplayHardware/ComposerHal.cpp",
93 "DisplayHardware/FramebufferSurface.cpp",
94 "DisplayHardware/HWC2.cpp",
95 "DisplayHardware/HWComposer.cpp",
96 "DisplayHardware/HWComposerBufferCache.cpp",
97 "DisplayHardware/VirtualDisplaySurface.cpp",
98 "DispSync.cpp",
99 "Effects/Daltonizer.cpp",
100 "EventControlThread.cpp",
101 "EventLog/EventLog.cpp",
102 "EventThread.cpp",
103 "FrameTracker.cpp",
104 "GpuService.cpp",
105 "Layer.cpp",
David Sodmanb8af7922017-12-21 15:17:55 -0800106 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107 "LayerProtoHelper.cpp",
108 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800109 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110 "LayerVector.cpp",
111 "MessageQueue.cpp",
112 "MonitoredProducer.cpp",
113 "RenderArea.cpp",
114 "RenderEngine/Description.cpp",
115 "RenderEngine/GLES20RenderEngine.cpp",
116 "RenderEngine/GLExtensions.cpp",
117 "RenderEngine/Image.cpp",
118 "RenderEngine/Mesh.cpp",
119 "RenderEngine/Program.cpp",
120 "RenderEngine/ProgramCache.cpp",
121 "RenderEngine/RenderEngine.cpp",
122 "RenderEngine/Surface.cpp",
123 "RenderEngine/Texture.cpp",
124 "StartPropertySetThread.cpp",
125 "SurfaceFlinger.cpp",
126 "SurfaceInterceptor.cpp",
127 "SurfaceTracing.cpp",
128 "Transform.cpp",
129 ],
130}
131
132cc_library_shared {
133 name: "libsurfaceflinger",
134 defaults: ["libsurfaceflinger_defaults"],
135 cflags: [
136 "-fvisibility=hidden",
137 "-Werror=format",
138 ],
139 srcs: [
140 ":libsurfaceflinger_sources",
141 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800142 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800143 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700144 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800145 "frameworks/native/vulkan/include",
146 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800147 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800148 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800149 ],
150 lto: {
151 thin: true,
152 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800153}
154
155cc_binary {
156 name: "surfaceflinger",
157 defaults: ["surfaceflinger_defaults"],
158 init_rc: ["surfaceflinger.rc"],
159 srcs: ["main_surfaceflinger.cpp"],
160 whole_static_libs: [
161 "libsigchain",
162 ],
163 shared_libs: [
164 "android.frameworks.displayservice@1.0",
165 "android.hardware.configstore-utils",
166 "android.hardware.configstore@1.0",
167 "android.hardware.graphics.allocator@2.0",
168 "libbinder",
169 "libcutils",
170 "libdisplayservicehidl",
171 "libhidlbase",
172 "libhidltransport",
173 "liblayers_proto",
174 "liblog",
175 "libsurfaceflinger",
176 "libutils",
177 ],
178 static_libs: [
179 "libserviceutils",
180 "libtrace_proto",
181 ],
182 ldflags: ["-Wl,--export-dynamic"],
183
184 // TODO(b/71715793): These version-scripts are required due to the use of
185 // whole_static_libs to pull in libsigchain. To work, the files had to be
186 // locally duplicated from their original location
187 // $ANDROID_ROOT/art/sigchainlib/
188 multilib: {
189 lib32: {
190 version_script: "version-script32.txt",
191 },
192 lib64: {
193 version_script: "version-script64.txt",
194 },
195 },
196}
197
198cc_library_shared {
199 name: "libsurfaceflinger_ddmconnection",
200 defaults: ["surfaceflinger_defaults"],
201 srcs: ["DdmConnection.cpp"],
202 shared_libs: [
203 "libcutils",
204 "libdl",
205 "liblog",
206 ],
207 product_variables: {
208 // uses jni which may not be available in PDK
209 pdk: {
210 enabled: false,
211 },
212 },
213}
214
215subdirs = [
216 "layerproto",
217 "tests",
218]