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