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: [ |
| 8 | "android.hardware.graphics.allocator@2.0", |
| 9 | "android.hardware.graphics.composer@2.1", |
| 10 | "android.hardware.graphics.composer@2.2", |
| 11 | "android.hardware.graphics.composer@2.3", |
| 12 | "android.hardware.power@1.0", |
| 13 | "android.hardware.power@1.3", |
| 14 | "libbase", |
| 15 | "libcutils", |
| 16 | "libgui", |
| 17 | "liblayers_proto", |
| 18 | "liblog", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 19 | "libnativewindow", |
| 20 | "libsync", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 21 | "libtimestats_proto", |
| 22 | "libui", |
| 23 | "libutils", |
| 24 | ], |
| 25 | static_libs: [ |
| 26 | "libmath", |
| 27 | "librenderengine", |
| 28 | "libtrace_proto", |
| 29 | ], |
| 30 | header_libs: [ |
| 31 | "libsurfaceflinger_headers", |
| 32 | ], |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | cc_library { |
| 36 | name: "libcompositionengine", |
| 37 | defaults: ["libcompositionengine_defaults"], |
| 38 | srcs: [ |
| 39 | "src/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 40 | "src/Display.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 41 | "src/DisplayColorProfile.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 42 | "src/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 43 | "src/DumpHelpers.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame^] | 44 | "src/Layer.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 45 | "src/Output.cpp", |
| 46 | "src/OutputCompositionState.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 47 | "src/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 48 | ], |
| 49 | local_include_dirs: ["include"], |
| 50 | export_include_dirs: ["include"], |
| 51 | } |
| 52 | |
| 53 | cc_library { |
| 54 | name: "libcompositionengine_mocks", |
| 55 | defaults: ["libcompositionengine_defaults"], |
| 56 | srcs: [ |
| 57 | "mock/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 58 | "mock/Display.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 59 | "mock/DisplayColorProfile.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 60 | "mock/DisplaySurface.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame^] | 61 | "mock/Layer.cpp", |
| 62 | "mock/LayerFE.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 63 | "mock/Output.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 64 | "mock/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 65 | ], |
| 66 | static_libs: [ |
| 67 | "libgtest", |
| 68 | "libgmock", |
| 69 | "libcompositionengine", |
| 70 | ], |
| 71 | local_include_dirs: ["include"], |
| 72 | export_include_dirs: ["include"], |
| 73 | } |
| 74 | |
| 75 | cc_test { |
| 76 | name: "libcompositionengine_test", |
| 77 | test_suites: ["device-tests"], |
| 78 | defaults: ["libcompositionengine_defaults"], |
| 79 | srcs: [ |
| 80 | "tests/CompositionEngineTest.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 81 | "tests/DisplayColorProfileTest.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 82 | "tests/DisplayTest.cpp", |
Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame^] | 83 | "tests/LayerTest.cpp", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 84 | "tests/MockHWComposer.cpp", |
Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 85 | "tests/OutputTest.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 86 | "tests/RenderSurfaceTest.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 87 | ], |
| 88 | static_libs: [ |
| 89 | "libcompositionengine", |
| 90 | "libcompositionengine_mocks", |
Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 91 | "librenderengine_mocks", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 92 | "libgmock", |
| 93 | "libgtest", |
| 94 | ], |
| 95 | sanitize: { |
| 96 | // By using the address sanitizer, we not only uncover any issues |
| 97 | // with the test, but also any issues with the code under test. |
| 98 | // |
| 99 | // Note: If you get an runtime link error like: |
| 100 | // |
| 101 | // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found |
| 102 | // |
| 103 | // it is because the address sanitizer shared objects are not installed |
| 104 | // by default in the system image. |
| 105 | // |
| 106 | // You can either "make dist tests" before flashing, or set this |
| 107 | // option to false temporarily. |
| 108 | address: true, |
| 109 | }, |
| 110 | } |