blob: ae589ca91ced5a0cbc9bad82ee5e21f27d4a4d8a [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",
27 "android.hardware.power@1.0",
28 "libbase",
29 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080030 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080031 "libcutils",
32 "libdl",
33 "libEGL",
34 "libfmq",
35 "libGLESv1_CM",
36 "libGLESv2",
37 "libgui",
38 "libhardware",
39 "libhidlbase",
40 "libhidltransport",
41 "libhwbinder",
42 "liblayers_proto",
43 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080044 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080045 "libprotobuf-cpp-lite",
46 "libsync",
47 "libui",
48 "libutils",
49 "libvulkan",
50 ],
51 static_libs: [
52 "libserviceutils",
53 "libtrace_proto",
54 "libvkjson",
55 "libvr_manager",
56 "libvrflinger",
57 ],
58 header_libs: [
59 "android.hardware.graphics.composer@2.1-command-buffer",
60 ],
61 export_static_lib_headers: [
62 "libserviceutils",
63 ],
64 export_shared_lib_headers: [
65 "android.hardware.graphics.allocator@2.0",
66 "android.hardware.graphics.composer@2.1",
67 "libhidlbase",
68 "libhidltransport",
69 "libhwbinder",
70 ],
71}
72
73cc_library_headers {
74 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080075 export_include_dirs: ["."],
Vishnu Nair35798872017-10-06 16:00:36 -070076 static_libs = ["libserviceutils"],
77 export_static_lib_headers = ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080078}
Kalle Raitaa099a242017-01-11 11:17:29 -080079
Lloyd Pique66ce40d2018-01-23 16:42:19 -080080filegroup {
81 name: "libsurfaceflinger_sources",
82 srcs: [
83 "BufferLayer.cpp",
84 "BufferLayerConsumer.cpp",
85 "Client.cpp",
86 "ColorLayer.cpp",
87 "DisplayDevice.cpp",
88 "DisplayHardware/ComposerHal.cpp",
89 "DisplayHardware/FramebufferSurface.cpp",
90 "DisplayHardware/HWC2.cpp",
91 "DisplayHardware/HWComposer.cpp",
92 "DisplayHardware/HWComposerBufferCache.cpp",
93 "DisplayHardware/VirtualDisplaySurface.cpp",
94 "DispSync.cpp",
95 "Effects/Daltonizer.cpp",
96 "EventControlThread.cpp",
97 "EventLog/EventLog.cpp",
98 "EventThread.cpp",
99 "FrameTracker.cpp",
100 "GpuService.cpp",
101 "Layer.cpp",
102 "LayerProtoHelper.cpp",
103 "LayerRejecter.cpp",
104 "LayerVector.cpp",
105 "MessageQueue.cpp",
106 "MonitoredProducer.cpp",
107 "RenderArea.cpp",
108 "RenderEngine/Description.cpp",
109 "RenderEngine/GLES20RenderEngine.cpp",
110 "RenderEngine/GLExtensions.cpp",
111 "RenderEngine/Image.cpp",
112 "RenderEngine/Mesh.cpp",
113 "RenderEngine/Program.cpp",
114 "RenderEngine/ProgramCache.cpp",
115 "RenderEngine/RenderEngine.cpp",
116 "RenderEngine/Surface.cpp",
117 "RenderEngine/Texture.cpp",
118 "StartPropertySetThread.cpp",
119 "SurfaceFlinger.cpp",
120 "SurfaceInterceptor.cpp",
121 "SurfaceTracing.cpp",
122 "Transform.cpp",
123 ],
124}
125
126cc_library_shared {
127 name: "libsurfaceflinger",
128 defaults: ["libsurfaceflinger_defaults"],
129 cflags: [
130 "-fvisibility=hidden",
131 "-Werror=format",
132 ],
133 srcs: [
134 ":libsurfaceflinger_sources",
135 ],
Chih-Hung Hsieh94574f22018-02-07 21:14:19 -0800136 arch: {
137 arm: {
138 instruction_set: "arm",
139 },
140 },
Lloyd Piquef58625d2017-12-19 13:22:33 -0800141 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 include_dirs: [
143 "external/vulkan-validation-layers/libs/vkjson",
144 "frameworks/native/vulkan/include",
145 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800146 cppflags: [
147 "-fwhole-program-vtables", // requires ThinLTO
148 ],
149 lto: {
150 thin: true,
151 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800152}
153
154cc_binary {
155 name: "surfaceflinger",
156 defaults: ["surfaceflinger_defaults"],
157 init_rc: ["surfaceflinger.rc"],
158 srcs: ["main_surfaceflinger.cpp"],
159 whole_static_libs: [
160 "libsigchain",
161 ],
162 shared_libs: [
163 "android.frameworks.displayservice@1.0",
164 "android.hardware.configstore-utils",
165 "android.hardware.configstore@1.0",
166 "android.hardware.graphics.allocator@2.0",
167 "libbinder",
168 "libcutils",
169 "libdisplayservicehidl",
170 "libhidlbase",
171 "libhidltransport",
172 "liblayers_proto",
173 "liblog",
174 "libsurfaceflinger",
175 "libutils",
176 ],
177 static_libs: [
178 "libserviceutils",
179 "libtrace_proto",
180 ],
181 ldflags: ["-Wl,--export-dynamic"],
182
183 // TODO(b/71715793): These version-scripts are required due to the use of
184 // whole_static_libs to pull in libsigchain. To work, the files had to be
185 // locally duplicated from their original location
186 // $ANDROID_ROOT/art/sigchainlib/
187 multilib: {
188 lib32: {
189 version_script: "version-script32.txt",
190 },
191 lib64: {
192 version_script: "version-script64.txt",
193 },
194 },
195}
196
197cc_library_shared {
198 name: "libsurfaceflinger_ddmconnection",
199 defaults: ["surfaceflinger_defaults"],
200 srcs: ["DdmConnection.cpp"],
201 shared_libs: [
202 "libcutils",
203 "libdl",
204 "liblog",
205 ],
206 product_variables: {
207 // uses jni which may not be available in PDK
208 pdk: {
209 enabled: false,
210 },
211 },
212}
213
214subdirs = [
215 "layerproto",
216 "tests",
217]