• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cc_defaults {
2    name: "puffin_defaults",
3    host_supported: true,
4    shared_libs: [
5        "libchrome",
6        "libprotobuf-cpp-lite",
7    ],
8    static_libs: [
9        "libbrotli",
10        "libbz",
11    ],
12    export_include_dirs: ["src/include"],
13    cflags: [
14        "-DUSE_BRILLO=1",
15        "-D_FILE_OFFSET_BITS=64",
16        "-Wall",
17        "-Werror",
18        "-Wextra",
19        "-Wimplicit-fallthrough",
20    ],
21    target: {
22        darwin: {
23            enabled: false,
24        },
25    },
26}
27
28cc_library_static {
29    name: "libpuffpatch",
30    defaults: ["puffin_defaults"],
31    recovery_available: true,
32    srcs: [
33        "puffin/src/puffin.proto",
34        "src/bit_reader.cc",
35        "src/bit_writer.cc",
36        "src/huffer.cc",
37        "src/huffman_table.cc",
38        "src/puff_reader.cc",
39        "src/puff_writer.cc",
40        "src/puffer.cc",
41        "src/puffin_stream.cc",
42        "src/puffpatch.cc",
43    ],
44    static_libs: [
45        "libbspatch",
46    ],
47    proto: {
48        type: "lite",
49        export_proto_headers: true,
50    },
51}
52
53cc_library_static {
54    name: "libpuffdiff",
55    defaults: ["puffin_defaults"],
56    srcs: [
57        "src/file_stream.cc",
58        "src/memory_stream.cc",
59        "src/puffdiff.cc",
60        "src/utils.cc",
61    ],
62    static_libs: [
63        "libbsdiff",
64        "libpuffpatch",
65    ],
66}
67
68cc_binary {
69    name: "puffin",
70    defaults: ["puffin_defaults"],
71    srcs: [
72        "src/extent_stream.cc",
73        "src/main.cc",
74    ],
75    shared_libs: [
76        "libbrillo",
77    ],
78    static_libs: [
79        "libbsdiff",
80        "libbspatch",
81        "libdivsufsort",
82        "libdivsufsort64",
83        "libpuffdiff",
84        "libpuffpatch",
85    ],
86}
87
88cc_test {
89    name: "puffin_unittest",
90    defaults: ["puffin_defaults"],
91    test_suites: ["device-tests"],
92    cflags: ["-Wno-sign-compare"],
93    srcs: [
94        "src/bit_io_unittest.cc",
95        "src/extent_stream.cc",
96        "src/patching_unittest.cc",
97        "src/puff_io_unittest.cc",
98        "src/puffin_unittest.cc",
99        "src/stream_unittest.cc",
100        "src/testrunner.cc",
101        "src/unittest_common.cc",
102        "src/utils_unittest.cc",
103    ],
104    shared_libs: [
105        "libbrillo",
106    ],
107    static_libs: [
108        "libbsdiff",
109        "libbspatch",
110        "libdivsufsort",
111        "libdivsufsort64",
112        "libpuffdiff",
113        "libpuffpatch",
114    ],
115}
116