Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "surfaceflinger_defaults", |
| 3 | cflags: [ |
| 4 | "-DLOG_TAG=\"SurfaceFlinger\"", |
| 5 | "-Wall", |
| 6 | "-Werror", |
Lloyd Pique | 755e319 | 2018-01-31 16:46:15 -0800 | [diff] [blame] | 7 | "-Wthread-safety", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 8 | "-Wunused", |
| 9 | "-Wunreachable-code", |
| 10 | ], |
| 11 | cppflags: ["-std=c++1z"], |
| 12 | } |
| 13 | |
| 14 | cc_defaults { |
| 15 | name: "libsurfaceflinger_defaults", |
| 16 | defaults: ["surfaceflinger_defaults"], |
| 17 | cflags: [ |
| 18 | "-DGL_GLEXT_PROTOTYPES", |
| 19 | "-DEGL_EGLEXT_PROTOTYPES", |
| 20 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 21 | shared_libs: [ |
| 22 | "android.frameworks.vr.composer@1.0", |
| 23 | "android.hardware.configstore-utils", |
| 24 | "android.hardware.configstore@1.0", |
Iris Chang | 7501ed6 | 2018-04-30 14:45:42 +0800 | [diff] [blame] | 25 | "android.hardware.configstore@1.1", |
Peiyong Lin | 13effd1 | 2018-07-24 17:01:47 -0700 | [diff] [blame] | 26 | "android.hardware.configstore@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 27 | "android.hardware.graphics.allocator@2.0", |
| 28 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 29 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 30 | "android.hardware.graphics.composer@2.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 31 | "android.hardware.power@1.0", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 32 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 33 | "libbase", |
| 34 | "libbinder", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 35 | "libbufferhubqueue", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 36 | "libcutils", |
| 37 | "libdl", |
| 38 | "libEGL", |
| 39 | "libfmq", |
| 40 | "libGLESv1_CM", |
| 41 | "libGLESv2", |
| 42 | "libgui", |
| 43 | "libhardware", |
| 44 | "libhidlbase", |
| 45 | "libhidltransport", |
| 46 | "libhwbinder", |
| 47 | "liblayers_proto", |
| 48 | "liblog", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 49 | "libpdx_default_transport", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 50 | "libprotobuf-cpp-lite", |
| 51 | "libsync", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 52 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 53 | "libui", |
| 54 | "libutils", |
| 55 | "libvulkan", |
| 56 | ], |
| 57 | static_libs: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame^] | 58 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 59 | "libserviceutils", |
| 60 | "libtrace_proto", |
| 61 | "libvkjson", |
| 62 | "libvr_manager", |
| 63 | "libvrflinger", |
| 64 | ], |
| 65 | header_libs: [ |
| 66 | "android.hardware.graphics.composer@2.1-command-buffer", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 67 | "android.hardware.graphics.composer@2.2-command-buffer", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 68 | ], |
| 69 | export_static_lib_headers: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame^] | 70 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 71 | "libserviceutils", |
| 72 | ], |
| 73 | export_shared_lib_headers: [ |
| 74 | "android.hardware.graphics.allocator@2.0", |
| 75 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 76 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 77 | "android.hardware.graphics.composer@2.3", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 78 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 79 | "libhidlbase", |
| 80 | "libhidltransport", |
| 81 | "libhwbinder", |
| 82 | ], |
| 83 | } |
| 84 | |
| 85 | cc_library_headers { |
| 86 | name: "libsurfaceflinger_headers", |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 87 | export_include_dirs: ["."], |
Logan Chien | 3ac6c96 | 2018-02-27 16:46:00 +0800 | [diff] [blame] | 88 | static_libs: ["libserviceutils"], |
| 89 | export_static_lib_headers: ["libserviceutils"], |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 90 | } |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 91 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 92 | filegroup { |
| 93 | name: "libsurfaceflinger_sources", |
| 94 | srcs: [ |
| 95 | "BufferLayer.cpp", |
| 96 | "BufferLayerConsumer.cpp", |
Marissa Wall | fd66862 | 2018-05-10 10:21:13 -0700 | [diff] [blame] | 97 | "BufferQueueLayer.cpp", |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 98 | "BufferStateLayer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 99 | "Client.cpp", |
| 100 | "ColorLayer.cpp", |
Robert Carr | cdf8320 | 2018-03-07 12:48:34 -0800 | [diff] [blame] | 101 | "ContainerLayer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 102 | "DisplayDevice.cpp", |
| 103 | "DisplayHardware/ComposerHal.cpp", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 104 | "DisplayHardware/DisplayIdentification.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 105 | "DisplayHardware/FramebufferSurface.cpp", |
| 106 | "DisplayHardware/HWC2.cpp", |
| 107 | "DisplayHardware/HWComposer.cpp", |
| 108 | "DisplayHardware/HWComposerBufferCache.cpp", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 109 | "DisplayHardware/PowerAdvisor.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 110 | "DisplayHardware/VirtualDisplaySurface.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 111 | "Effects/Daltonizer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 112 | "EventLog/EventLog.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 113 | "FrameTracker.cpp", |
| 114 | "GpuService.cpp", |
| 115 | "Layer.cpp", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 116 | "LayerBE.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 117 | "LayerProtoHelper.cpp", |
| 118 | "LayerRejecter.cpp", |
Yiwei Zhang | 7124ad3 | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 119 | "LayerStats.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 120 | "LayerVector.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 121 | "MonitoredProducer.cpp", |
| 122 | "RenderArea.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 123 | "Scheduler/DispSync.cpp", |
Ana Krulec | 241cf83 | 2018-08-10 15:03:23 -0700 | [diff] [blame] | 124 | "Scheduler/DispSyncSource.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 125 | "Scheduler/EventControlThread.cpp", |
| 126 | "Scheduler/EventThread.cpp", |
| 127 | "Scheduler/MessageQueue.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 128 | "StartPropertySetThread.cpp", |
| 129 | "SurfaceFlinger.cpp", |
| 130 | "SurfaceInterceptor.cpp", |
| 131 | "SurfaceTracing.cpp", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 132 | "TimeStats/TimeStats.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 133 | ], |
| 134 | } |
| 135 | |
| 136 | cc_library_shared { |
| 137 | name: "libsurfaceflinger", |
| 138 | defaults: ["libsurfaceflinger_defaults"], |
| 139 | cflags: [ |
| 140 | "-fvisibility=hidden", |
| 141 | "-Werror=format", |
| 142 | ], |
| 143 | srcs: [ |
| 144 | ":libsurfaceflinger_sources", |
| 145 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 146 | logtags: ["EventLog/EventLogTags.logtags"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 147 | include_dirs: [ |
Yiwei Zhang | 66e0175 | 2018-04-24 14:16:09 -0700 | [diff] [blame] | 148 | "frameworks/native/vulkan/vkjson", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 149 | "frameworks/native/vulkan/include", |
| 150 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 151 | cppflags: [ |
Logan Chien | 3ac6c96 | 2018-02-27 16:46:00 +0800 | [diff] [blame] | 152 | "-fwhole-program-vtables", // requires ThinLTO |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 153 | ], |
| 154 | lto: { |
| 155 | thin: true, |
| 156 | }, |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | cc_binary { |
| 160 | name: "surfaceflinger", |
| 161 | defaults: ["surfaceflinger_defaults"], |
| 162 | init_rc: ["surfaceflinger.rc"], |
| 163 | srcs: ["main_surfaceflinger.cpp"], |
| 164 | whole_static_libs: [ |
| 165 | "libsigchain", |
| 166 | ], |
| 167 | shared_libs: [ |
| 168 | "android.frameworks.displayservice@1.0", |
| 169 | "android.hardware.configstore-utils", |
| 170 | "android.hardware.configstore@1.0", |
Peiyong Lin | 13effd1 | 2018-07-24 17:01:47 -0700 | [diff] [blame] | 171 | "android.hardware.configstore@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 172 | "android.hardware.graphics.allocator@2.0", |
| 173 | "libbinder", |
| 174 | "libcutils", |
| 175 | "libdisplayservicehidl", |
| 176 | "libhidlbase", |
| 177 | "libhidltransport", |
| 178 | "liblayers_proto", |
| 179 | "liblog", |
| 180 | "libsurfaceflinger", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 181 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 182 | "libutils", |
| 183 | ], |
| 184 | static_libs: [ |
| 185 | "libserviceutils", |
| 186 | "libtrace_proto", |
| 187 | ], |
| 188 | ldflags: ["-Wl,--export-dynamic"], |
| 189 | |
| 190 | // TODO(b/71715793): These version-scripts are required due to the use of |
| 191 | // whole_static_libs to pull in libsigchain. To work, the files had to be |
| 192 | // locally duplicated from their original location |
| 193 | // $ANDROID_ROOT/art/sigchainlib/ |
| 194 | multilib: { |
| 195 | lib32: { |
| 196 | version_script: "version-script32.txt", |
| 197 | }, |
| 198 | lib64: { |
| 199 | version_script: "version-script64.txt", |
| 200 | }, |
| 201 | }, |
| 202 | } |
| 203 | |
| 204 | cc_library_shared { |
| 205 | name: "libsurfaceflinger_ddmconnection", |
| 206 | defaults: ["surfaceflinger_defaults"], |
| 207 | srcs: ["DdmConnection.cpp"], |
| 208 | shared_libs: [ |
| 209 | "libcutils", |
| 210 | "libdl", |
| 211 | "liblog", |
| 212 | ], |
| 213 | product_variables: { |
| 214 | // uses jni which may not be available in PDK |
| 215 | pdk: { |
| 216 | enabled: false, |
| 217 | }, |
| 218 | }, |
| 219 | } |
| 220 | |
| 221 | subdirs = [ |
| 222 | "layerproto", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 223 | "TimeStats/timestatsproto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 224 | "tests", |
| 225 | ] |