blob: ce4daa5f358dabd293e48603169d12e1c6fc7b38 [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 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080011}
12
13cc_defaults {
14 name: "libsurfaceflinger_defaults",
15 defaults: ["surfaceflinger_defaults"],
16 cflags: [
17 "-DGL_GLEXT_PROTOTYPES",
18 "-DEGL_EGLEXT_PROTOTYPES",
19 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080020 shared_libs: [
21 "android.frameworks.vr.composer@1.0",
22 "android.hardware.configstore-utils",
23 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080024 "android.hardware.configstore@1.1",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080025 "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",
Michael Wright1509a232018-06-21 02:50:34 +010029 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080030 "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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 ],
53 static_libs: [
54 "libserviceutils",
55 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080056 "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",
Michael Wright1509a232018-06-21 02:50:34 +010070 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080071 "libhidlbase",
72 "libhidltransport",
73 "libhwbinder",
74 ],
75}
76
77cc_library_headers {
78 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080079 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080080 static_libs: ["libserviceutils"],
81 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080082}
Kalle Raitaa099a242017-01-11 11:17:29 -080083
Lloyd Pique66ce40d2018-01-23 16:42:19 -080084filegroup {
85 name: "libsurfaceflinger_sources",
86 srcs: [
87 "BufferLayer.cpp",
88 "BufferLayerConsumer.cpp",
89 "Client.cpp",
90 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080091 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080092 "DisplayDevice.cpp",
93 "DisplayHardware/ComposerHal.cpp",
94 "DisplayHardware/FramebufferSurface.cpp",
95 "DisplayHardware/HWC2.cpp",
96 "DisplayHardware/HWComposer.cpp",
97 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright1509a232018-06-21 02:50:34 +010098 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080099 "DisplayHardware/VirtualDisplaySurface.cpp",
100 "DispSync.cpp",
101 "Effects/Daltonizer.cpp",
102 "EventControlThread.cpp",
103 "EventLog/EventLog.cpp",
104 "EventThread.cpp",
105 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800106 "Layer.cpp",
107 "LayerProtoHelper.cpp",
108 "LayerRejecter.cpp",
Yiwei Zhang068e31b2018-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",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700128 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "Transform.cpp",
130 ],
131}
132
133cc_library_shared {
134 name: "libsurfaceflinger",
135 defaults: ["libsurfaceflinger_defaults"],
136 cflags: [
137 "-fvisibility=hidden",
138 "-Werror=format",
139 ],
140 srcs: [
141 ":libsurfaceflinger_sources",
142 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800143 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800144 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700145 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800146 "frameworks/native/vulkan/include",
147 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800148 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800149 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800150 ],
151 lto: {
152 thin: true,
153 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800154}
155
156cc_binary {
157 name: "surfaceflinger",
158 defaults: ["surfaceflinger_defaults"],
159 init_rc: ["surfaceflinger.rc"],
160 srcs: ["main_surfaceflinger.cpp"],
161 whole_static_libs: [
162 "libsigchain",
163 ],
164 shared_libs: [
165 "android.frameworks.displayservice@1.0",
166 "android.hardware.configstore-utils",
167 "android.hardware.configstore@1.0",
168 "android.hardware.graphics.allocator@2.0",
169 "libbinder",
170 "libcutils",
171 "libdisplayservicehidl",
172 "libhidlbase",
173 "libhidltransport",
174 "liblayers_proto",
175 "liblog",
176 "libsurfaceflinger",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700177 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800178 "libutils",
179 ],
180 static_libs: [
181 "libserviceutils",
182 "libtrace_proto",
183 ],
184 ldflags: ["-Wl,--export-dynamic"],
185
186 // TODO(b/71715793): These version-scripts are required due to the use of
187 // whole_static_libs to pull in libsigchain. To work, the files had to be
188 // locally duplicated from their original location
189 // $ANDROID_ROOT/art/sigchainlib/
190 multilib: {
191 lib32: {
192 version_script: "version-script32.txt",
193 },
194 lib64: {
195 version_script: "version-script64.txt",
196 },
197 },
198}
199
200cc_library_shared {
201 name: "libsurfaceflinger_ddmconnection",
202 defaults: ["surfaceflinger_defaults"],
203 srcs: ["DdmConnection.cpp"],
204 shared_libs: [
205 "libcutils",
206 "libdl",
207 "liblog",
208 ],
209 product_variables: {
210 // uses jni which may not be available in PDK
211 pdk: {
212 enabled: false,
213 },
214 },
215}
216
217subdirs = [
218 "layerproto",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700219 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800220 "tests",
221]