blob: 0c0fedc8b2a4da77b1b64d5d8684c73c5f7fe76c [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",
90 "DisplayDevice.cpp",
91 "DisplayHardware/ComposerHal.cpp",
92 "DisplayHardware/FramebufferSurface.cpp",
93 "DisplayHardware/HWC2.cpp",
94 "DisplayHardware/HWComposer.cpp",
95 "DisplayHardware/HWComposerBufferCache.cpp",
96 "DisplayHardware/VirtualDisplaySurface.cpp",
97 "DispSync.cpp",
98 "Effects/Daltonizer.cpp",
99 "EventControlThread.cpp",
100 "EventLog/EventLog.cpp",
101 "EventThread.cpp",
102 "FrameTracker.cpp",
103 "GpuService.cpp",
104 "Layer.cpp",
105 "LayerProtoHelper.cpp",
106 "LayerRejecter.cpp",
107 "LayerVector.cpp",
108 "MessageQueue.cpp",
109 "MonitoredProducer.cpp",
110 "RenderArea.cpp",
111 "RenderEngine/Description.cpp",
112 "RenderEngine/GLES20RenderEngine.cpp",
113 "RenderEngine/GLExtensions.cpp",
114 "RenderEngine/Image.cpp",
115 "RenderEngine/Mesh.cpp",
116 "RenderEngine/Program.cpp",
117 "RenderEngine/ProgramCache.cpp",
118 "RenderEngine/RenderEngine.cpp",
119 "RenderEngine/Surface.cpp",
120 "RenderEngine/Texture.cpp",
121 "StartPropertySetThread.cpp",
122 "SurfaceFlinger.cpp",
123 "SurfaceInterceptor.cpp",
124 "SurfaceTracing.cpp",
125 "Transform.cpp",
126 ],
127}
128
129cc_library_shared {
130 name: "libsurfaceflinger",
131 defaults: ["libsurfaceflinger_defaults"],
132 cflags: [
133 "-fvisibility=hidden",
134 "-Werror=format",
135 ],
136 srcs: [
137 ":libsurfaceflinger_sources",
138 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800139 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800140 include_dirs: [
141 "external/vulkan-validation-layers/libs/vkjson",
142 "frameworks/native/vulkan/include",
143 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800144 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800145 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800146 ],
147 lto: {
148 thin: true,
149 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800150}
151
152cc_binary {
153 name: "surfaceflinger",
154 defaults: ["surfaceflinger_defaults"],
155 init_rc: ["surfaceflinger.rc"],
156 srcs: ["main_surfaceflinger.cpp"],
157 whole_static_libs: [
158 "libsigchain",
159 ],
160 shared_libs: [
161 "android.frameworks.displayservice@1.0",
162 "android.hardware.configstore-utils",
163 "android.hardware.configstore@1.0",
164 "android.hardware.graphics.allocator@2.0",
165 "libbinder",
166 "libcutils",
167 "libdisplayservicehidl",
168 "libhidlbase",
169 "libhidltransport",
170 "liblayers_proto",
171 "liblog",
172 "libsurfaceflinger",
173 "libutils",
174 ],
175 static_libs: [
176 "libserviceutils",
177 "libtrace_proto",
178 ],
179 ldflags: ["-Wl,--export-dynamic"],
180
181 // TODO(b/71715793): These version-scripts are required due to the use of
182 // whole_static_libs to pull in libsigchain. To work, the files had to be
183 // locally duplicated from their original location
184 // $ANDROID_ROOT/art/sigchainlib/
185 multilib: {
186 lib32: {
187 version_script: "version-script32.txt",
188 },
189 lib64: {
190 version_script: "version-script64.txt",
191 },
192 },
193}
194
195cc_library_shared {
196 name: "libsurfaceflinger_ddmconnection",
197 defaults: ["surfaceflinger_defaults"],
198 srcs: ["DdmConnection.cpp"],
199 shared_libs: [
200 "libcutils",
201 "libdl",
202 "liblog",
203 ],
204 product_variables: {
205 // uses jni which may not be available in PDK
206 pdk: {
207 enabled: false,
208 },
209 },
210}
211
212subdirs = [
213 "layerproto",
214 "tests",
215]