blob: c8b2d91627fff066212305c79def167732d43fb7 [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",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000047 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080048 "libprotobuf-cpp-lite",
49 "libsync",
Yiwei Zhang0102ad22018-05-02 17:37:17 -070050 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080051 "libui",
52 "libutils",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 ],
54 static_libs: [
55 "libserviceutils",
56 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080057 "libvr_manager",
58 "libvrflinger",
59 ],
60 header_libs: [
61 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070062 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080063 ],
64 export_static_lib_headers: [
65 "libserviceutils",
66 ],
67 export_shared_lib_headers: [
68 "android.hardware.graphics.allocator@2.0",
69 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070070 "android.hardware.graphics.composer@2.2",
Michael Wright1509a232018-06-21 02:50:34 +010071 "android.hardware.power@1.3",
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",
Michael Wright1509a232018-06-21 02:50:34 +010099 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800100 "DisplayHardware/VirtualDisplaySurface.cpp",
101 "DispSync.cpp",
102 "Effects/Daltonizer.cpp",
103 "EventControlThread.cpp",
104 "EventLog/EventLog.cpp",
105 "EventThread.cpp",
106 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107 "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 },
Mitch Phillips3ca041d2019-05-14 13:08:29 -0700155 // TODO(b/131771163): Fix broken fuzzer support with LTO.
156 sanitize: {
157 fuzzer: false,
158 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800159}
160
161cc_binary {
162 name: "surfaceflinger",
163 defaults: ["surfaceflinger_defaults"],
164 init_rc: ["surfaceflinger.rc"],
165 srcs: ["main_surfaceflinger.cpp"],
166 whole_static_libs: [
167 "libsigchain",
168 ],
169 shared_libs: [
170 "android.frameworks.displayservice@1.0",
171 "android.hardware.configstore-utils",
172 "android.hardware.configstore@1.0",
173 "android.hardware.graphics.allocator@2.0",
174 "libbinder",
175 "libcutils",
176 "libdisplayservicehidl",
177 "libhidlbase",
178 "libhidltransport",
179 "liblayers_proto",
180 "liblog",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +0000181 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800182 "libsurfaceflinger",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700183 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800184 "libutils",
185 ],
186 static_libs: [
187 "libserviceutils",
188 "libtrace_proto",
189 ],
190 ldflags: ["-Wl,--export-dynamic"],
191
192 // TODO(b/71715793): These version-scripts are required due to the use of
193 // whole_static_libs to pull in libsigchain. To work, the files had to be
194 // locally duplicated from their original location
195 // $ANDROID_ROOT/art/sigchainlib/
196 multilib: {
197 lib32: {
198 version_script: "version-script32.txt",
199 },
200 lib64: {
201 version_script: "version-script64.txt",
202 },
203 },
204}
205
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800206subdirs = [
207 "layerproto",
Yiwei Zhang0102ad22018-05-02 17:37:17 -0700208 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800209 "tests",
210]