Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "libcompositionengine_defaults", |
| 3 | defaults: ["surfaceflinger_defaults"], |
| 4 | cflags: [ |
| 5 | "-DLOG_TAG=\"CompositionEngine\"", |
| 6 | ], |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 7 | shared_libs: [ |
mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 8 | "android.frameworks.vr.composer@2.0", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 9 | "android.hardware.graphics.allocator@2.0", |
| 10 | "android.hardware.graphics.composer@2.1", |
| 11 | "android.hardware.graphics.composer@2.2", |
| 12 | "android.hardware.graphics.composer@2.3", |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame^] | 13 | "android.hardware.graphics.composer@2.4", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 14 | "android.hardware.power@1.0", |
| 15 | "android.hardware.power@1.3", |
| 16 | "libbase", |
| 17 | "libcutils", |
| 18 | "libgui", |
| 19 | "liblayers_proto", |
| 20 | "liblog", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 21 | "libnativewindow", |
| 22 | "libsync", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 23 | "libtimestats_proto", |
| 24 | "libui", |
| 25 | "libutils", |
| 26 | ], |
| 27 | static_libs: [ |
| 28 | "libmath", |
| 29 | "librenderengine", |
| 30 | "libtrace_proto", |
| 31 | ], |
| 32 | header_libs: [ |
Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 33 | "android.hardware.graphics.composer@2.1-command-buffer", |
| 34 | "android.hardware.graphics.composer@2.2-command-buffer", |
| 35 | "android.hardware.graphics.composer@2.3-command-buffer", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 36 | "libsurfaceflinger_headers", |
| 37 | ], |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | cc_library { |
| 41 | name: "libcompositionengine", |
| 42 | defaults: ["libcompositionengine_defaults"], |
| 43 | srcs: [ |
| 44 | "src/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 45 | "src/Display.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 46 | "src/DisplayColorProfile.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 47 | "src/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 48 | "src/DumpHelpers.cpp", |
Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 49 | "src/HwcBufferCache.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 50 | "src/Layer.cpp", |
Lloyd Pique | 9755fb7 | 2019-03-26 14:44:40 -0700 | [diff] [blame] | 51 | "src/LayerFECompositionState.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 52 | "src/Output.cpp", |
| 53 | "src/OutputCompositionState.cpp", |
Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 54 | "src/OutputLayer.cpp", |
Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 55 | "src/OutputLayerCompositionState.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 56 | "src/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 57 | ], |
| 58 | local_include_dirs: ["include"], |
| 59 | export_include_dirs: ["include"], |
| 60 | } |
| 61 | |
| 62 | cc_library { |
| 63 | name: "libcompositionengine_mocks", |
| 64 | defaults: ["libcompositionengine_defaults"], |
| 65 | srcs: [ |
| 66 | "mock/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 67 | "mock/Display.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 68 | "mock/DisplayColorProfile.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 69 | "mock/DisplaySurface.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 70 | "mock/Layer.cpp", |
| 71 | "mock/LayerFE.cpp", |
chaviw | 8beb414 | 2019-04-11 13:09:05 -0700 | [diff] [blame] | 72 | "mock/NativeWindow.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 73 | "mock/Output.cpp", |
Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 74 | "mock/OutputLayer.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 75 | "mock/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 76 | ], |
| 77 | static_libs: [ |
| 78 | "libgtest", |
| 79 | "libgmock", |
| 80 | "libcompositionengine", |
| 81 | ], |
| 82 | local_include_dirs: ["include"], |
| 83 | export_include_dirs: ["include"], |
| 84 | } |
| 85 | |
| 86 | cc_test { |
| 87 | name: "libcompositionengine_test", |
| 88 | test_suites: ["device-tests"], |
| 89 | defaults: ["libcompositionengine_defaults"], |
| 90 | srcs: [ |
| 91 | "tests/CompositionEngineTest.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 92 | "tests/DisplayColorProfileTest.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 93 | "tests/DisplayTest.cpp", |
Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 94 | "tests/HwcBufferCacheTest.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 95 | "tests/LayerTest.cpp", |
Lloyd Pique | 35d5824 | 2018-12-18 16:33:25 -0800 | [diff] [blame] | 96 | "tests/MockHWC2.cpp", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 97 | "tests/MockHWComposer.cpp", |
Lloyd Pique | 688abd4 | 2019-02-15 15:42:24 -0800 | [diff] [blame] | 98 | "tests/MockPowerAdvisor.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 99 | "tests/OutputTest.cpp", |
Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 100 | "tests/OutputLayerTest.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 101 | "tests/RenderSurfaceTest.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 102 | ], |
| 103 | static_libs: [ |
| 104 | "libcompositionengine", |
| 105 | "libcompositionengine_mocks", |
Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 106 | "librenderengine_mocks", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 107 | "libgmock", |
| 108 | "libgtest", |
| 109 | ], |
| 110 | sanitize: { |
| 111 | // By using the address sanitizer, we not only uncover any issues |
| 112 | // with the test, but also any issues with the code under test. |
| 113 | // |
| 114 | // Note: If you get an runtime link error like: |
| 115 | // |
| 116 | // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found |
| 117 | // |
| 118 | // it is because the address sanitizer shared objects are not installed |
| 119 | // by default in the system image. |
| 120 | // |
| 121 | // You can either "make dist tests" before flashing, or set this |
| 122 | // option to false temporarily. |
Yi Kong | f43b664 | 2019-08-20 17:37:52 -0700 | [diff] [blame] | 123 | |
| 124 | |
| 125 | // FIXME: ASAN build is broken for a while, but was not discovered |
| 126 | // since new PM silently suppressed ASAN. Temporarily turn off ASAN |
| 127 | // to unblock the compiler upgrade process. |
| 128 | // address: true, |
| 129 | // http://b/139747256 |
| 130 | address: false, |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 131 | }, |
| 132 | } |