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    host_supported: true,
14    vendor_available: true,
15    cflags: [
16        "-Wno-unused-parameter",
17        "-Wno-reorder-ctor",
18    ],
19    srcs: [
20        "AlignedBuf.cpp",
21        "CompressingStream.cpp",
22        "CpuTime.cpp",
23        "DecompressingStream.cpp",
24        "FileUtils.cpp",
25        "FunctorThread.cpp",
26        "GraphicsObjectCounter.cpp",
27        "GLObjectCounter.cpp",
28        "HealthMonitor.cpp",
29        "LayoutResolver.cpp",
30        "MemStream.cpp",
31        "StdioStream.cpp",
32        "MemoryTracker.cpp",
33        "MessageChannel.cpp",
34        "Metrics.cpp",
35        "PathUtils.cpp",
36        "ring_buffer.cpp",
37        "SharedLibrary.cpp",
38        "SharedMemory_posix.cpp",
39        "StringFormat.cpp",
40        "Stream.cpp",
41        "StreamSerializing.cpp",
42        "SubAllocator.cpp",
43        "System.cpp",
44        "Tracing.cpp",
45        "Thread_pthread.cpp",
46    ],
47    header_libs: [
48        "libgfxstream_thirdparty_renderdoc_headers",
49        "aemu_common_headers",
50
51    ],
52    export_header_lib_headers: ["libgfxstream_thirdparty_renderdoc_headers"],
53    static_libs: ["liblz4"],
54    apex_available: [
55        "//apex_available:platform",
56        "com.android.virt",
57    ],
58}
59
60// Run with `atest --host gfxstream_base_tests`
61cc_test_host {
62    name: "gfxstream_base_tests",
63    defaults: ["gfxstream_defaults"],
64    srcs: [
65        "LruCache_unittest.cpp",
66    ],
67    static_libs: [
68        "gfxstream_base",
69        "libgmock",
70        "libgtest",
71        "libgtest_main",
72    ],
73    test_options: {
74        unit_test: true,
75    },
76}
77
78cc_test_library {
79    name: "gfxstream_base_test_support",
80    defaults: ["gfxstream_defaults"],
81    srcs: [
82        "testing/file_io.cpp",
83    ],
84    static_libs: [
85        "gfxstream_base",
86    ],
87}
88