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 | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 41 | "src/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 42 | "src/DumpHelpers.cpp", |
| 43 | "src/Output.cpp", |
| 44 | "src/OutputCompositionState.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame^] | 45 | "src/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 46 | ], |
| 47 | local_include_dirs: ["include"], |
| 48 | export_include_dirs: ["include"], |
| 49 | } |
| 50 | |
| 51 | cc_library { |
| 52 | name: "libcompositionengine_mocks", |
| 53 | defaults: ["libcompositionengine_defaults"], |
| 54 | srcs: [ |
| 55 | "mock/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 56 | "mock/Display.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 57 | "mock/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 58 | "mock/Output.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame^] | 59 | "mock/RenderSurface.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 60 | ], |
| 61 | static_libs: [ |
| 62 | "libgtest", |
| 63 | "libgmock", |
| 64 | "libcompositionengine", |
| 65 | ], |
| 66 | local_include_dirs: ["include"], |
| 67 | export_include_dirs: ["include"], |
| 68 | } |
| 69 | |
| 70 | cc_test { |
| 71 | name: "libcompositionengine_test", |
| 72 | test_suites: ["device-tests"], |
| 73 | defaults: ["libcompositionengine_defaults"], |
| 74 | srcs: [ |
| 75 | "tests/CompositionEngineTest.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 76 | "tests/DisplayTest.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 77 | "tests/OutputTest.cpp", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 78 | "tests/MockHWComposer.cpp", |
Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame^] | 79 | "tests/RenderSurfaceTest.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 80 | ], |
| 81 | static_libs: [ |
| 82 | "libcompositionengine", |
| 83 | "libcompositionengine_mocks", |
Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 84 | "librenderengine_mocks", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 85 | "libgmock", |
| 86 | "libgtest", |
| 87 | ], |
| 88 | sanitize: { |
| 89 | // By using the address sanitizer, we not only uncover any issues |
| 90 | // with the test, but also any issues with the code under test. |
| 91 | // |
| 92 | // Note: If you get an runtime link error like: |
| 93 | // |
| 94 | // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found |
| 95 | // |
| 96 | // it is because the address sanitizer shared objects are not installed |
| 97 | // by default in the system image. |
| 98 | // |
| 99 | // You can either "make dist tests" before flashing, or set this |
| 100 | // option to false temporarily. |
| 101 | address: true, |
| 102 | }, |
| 103 | } |