1package {
2    default_team: "trendy_team_automotive",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_google_aemu_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["hardware_google_aemu_license"],
9}
10
11cc_library_static {
12    name: "gfxstream_base",
13    defaults: ["gfxstream_defaults"],
14    srcs: [
15        "AlignedBuf.cpp",
16        "CompressingStream.cpp",
17        "CpuTime.cpp",
18        "DecompressingStream.cpp",
19        "FileUtils.cpp",
20        "FunctorThread.cpp",
21        "GLObjectCounter.cpp",
22        "HealthMonitor.cpp",
23        "LayoutResolver.cpp",
24        "MemStream.cpp",
25        "StdioStream.cpp",
26        "MemoryTracker.cpp",
27        "MessageChannel.cpp",
28        "Metrics.cpp",
29        "PathUtils.cpp",
30        "ring_buffer.cpp",
31        "SharedLibrary.cpp",
32        "SharedMemory_posix.cpp",
33        "StringFormat.cpp",
34        "Stream.cpp",
35        "StreamSerializing.cpp",
36        "SubAllocator.cpp",
37        "System.cpp",
38        "Tracing.cpp",
39        "Thread_pthread.cpp",
40    ],
41    header_libs: ["libgfxstream_thirdparty_renderdoc_headers"],
42    export_header_lib_headers: ["libgfxstream_thirdparty_renderdoc_headers"],
43    static_libs: ["liblz4"],
44}
45
46// Run with `atest --host gfxstream_base_tests`
47cc_test_host {
48    name: "gfxstream_base_tests",
49    defaults: ["gfxstream_defaults"],
50    srcs: [
51        "LruCache_unittest.cpp",
52    ],
53    static_libs: [
54        "gfxstream_base",
55        "libgmock",
56        "libgtest",
57        "libgtest_main",
58    ],
59    test_options: {
60        unit_test: true,
61    },
62}
63
64cc_test_library {
65    name: "gfxstream_base_test_support",
66    defaults: ["gfxstream_defaults"],
67    srcs: [
68        "testing/file_io.cpp",
69    ],
70    static_libs: [
71        "gfxstream_base",
72    ],
73}
74