Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_hdlc / BUILD
1 # Copyright 2020 The Pigweed Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
5 # the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
15 load(
16     "//pw_build:pigweed.bzl",
17     "pw_cc_library",
18 )
19
20 package(default_visibility = ["//visibility:public"])
21
22 licenses(["notice"])  # Apache License 2.0
23
24 pw_cc_library(
25     name = "pw_hdlc",
26     srcs = [
27         "decoder.cc",
28         "encoder.cc",
29         "public/pw_hdlc/internal/encoder.h",
30         "pw_hdlc_private/protocol.h",
31         "rpc_packets.cc",
32     ],
33     hdrs = [
34         "public/pw_hdlc/decoder.h",
35         "public/pw_hdlc/encoder.h",
36     ],
37     includes = ["public"],
38     deps = [
39         "//pw_bytes",
40         "//pw_checksum",
41         "//pw_log",
42         "//pw_result",
43         "//pw_span",
44         "//pw_status",
45         "//pw_stream",
46     ],
47 )
48
49 pw_cc_library(
50     name = "rpc_channel_output",
51     hdrs = ["public/pw_hdlc/rpc_channel.h"],
52     includes = ["public"],
53     deps = [
54         ":pw_hdlc",
55         "//pw_rpc:server",
56     ],
57 )
58
59 pw_cc_library(
60     name = "pw_rpc",
61     srcs = ["rpc_packets.cc"],
62     hdrs = ["public/pw_hdlc/rpc_packets.h"],
63     includes = ["public"],
64     deps = [
65         ":pw_hdlc",
66         "//pw_rpc:server",
67     ],
68 )
69
70 pw_cc_library(
71     name = "packet_parser",
72     srcs = ["wire_packet_parser.cc"],
73     hdrs = ["public/pw_hdlc/wire_packet_parser.h"],
74     includes = ["public"],
75     deps = [
76         ":pw_hdlc",
77         "//pw_assert",
78         "//pw_bytes",
79         "//pw_checksum",
80         "//pw_router:packet_parser",
81     ],
82 )
83
84 cc_test(
85     name = "encoder_test",
86     srcs = ["encoder_test.cc"],
87     deps = [
88         ":pw_hdlc",
89         "//pw_stream",
90         "//pw_unit_test",
91     ],
92 )
93
94 cc_test(
95     name = "decoder_test",
96     srcs = ["decoder_test.cc"],
97     deps = [
98         ":pw_hdlc",
99         "//pw_result",
100         "//pw_stream",
101         "//pw_unit_test",
102     ],
103 )
104
105 cc_test(
106     name = "wire_packet_parser_test",
107     srcs = ["wire_packet_parser_test.cc"],
108     deps = [
109         ":packet_parser",
110         "//pw_bytes",
111     ],
112 )
113
114 cc_test(
115     name = "rpc_channel_test",
116     srcs = ["rpc_channel_test.cc"],
117     deps = [
118         ":pw_hdlc",
119         "//pw_stream",
120         "//pw_unit_test",
121     ],
122 )