Skip to content

Commit

Permalink
pw_span: Explicitly specify pw_span dependencies in GN
Browse files Browse the repository at this point in the history
Bug: b/235237667
Change-Id: I856854de6d3a89510bce6912f6567c2ab86977ce
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/99620
Reviewed-by: Ted Pudlik <[email protected]>
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Jun 24, 2022
1 parent 801d66a commit 1c974a1
Show file tree
Hide file tree
Showing 46 changed files with 102 additions and 16 deletions.
13 changes: 8 additions & 5 deletions pw_allocator/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ pw_source_set("block") {
configs = [ ":enable_heap_poison" ]
public = [ "public/pw_allocator/block.h" ]
public_deps = [
"$dir_pw_assert",
"$dir_pw_status",
dir_pw_assert,
dir_pw_span,
dir_pw_status,
]
sources = [ "block.cc" ]
}
Expand All @@ -57,7 +58,8 @@ pw_source_set("freelist") {
public = [ "public/pw_allocator/freelist.h" ]
public_deps = [
"$dir_pw_containers:vector",
"$dir_pw_status",
dir_pw_span,
dir_pw_status,
]
sources = [ "freelist.cc" ]
}
Expand All @@ -71,8 +73,9 @@ pw_source_set("freelist_heap") {
":freelist",
]
deps = [
"$dir_pw_assert",
"$dir_pw_log",
dir_pw_assert,
dir_pw_log,
dir_pw_span,
]
sources = [ "freelist_heap.cc" ]
}
Expand Down
1 change: 1 addition & 0 deletions pw_assert/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ pw_test("assert_facade_test") {
]
deps = [
":pw_assert",
dir_pw_span,
dir_pw_status,
dir_pw_string,
]
Expand Down
1 change: 1 addition & 0 deletions pw_assert_tokenized/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ pw_source_set("log_handler") {
"$dir_pw_bytes",
"$dir_pw_log",
"$dir_pw_log_tokenized",
"$dir_pw_span",
]
sources = [ "log_handler.cc" ]
}
Expand Down
1 change: 1 addition & 0 deletions pw_base64/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config("default_config") {
pw_source_set("pw_base64") {
public_configs = [ ":default_config" ]
public = [ "public/pw_base64/base64.h" ]
public_deps = [ dir_pw_span ]
sources = [ "base64.cc" ]
}

Expand Down
1 change: 1 addition & 0 deletions pw_blob_store/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pw_source_set("pw_blob_store") {
dir_pw_bytes,
dir_pw_kvs,
dir_pw_preprocessor,
dir_pw_span,
dir_pw_status,
dir_pw_stream,
]
Expand Down
1 change: 1 addition & 0 deletions pw_bluetooth/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pw_source_set("pw_bluetooth") {
"$dir_pw_chrono:system_clock",
dir_pw_containers,
dir_pw_function,
dir_pw_span,
dir_pw_status,
]
}
Expand Down
2 changes: 2 additions & 0 deletions pw_bluetooth_hci/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pw_source_set("packet") {
dir_pw_assert,
dir_pw_bytes,
dir_pw_result,
dir_pw_span,
]
sources = [ "packet.cc" ]
deps = [ dir_pw_status ]
Expand All @@ -53,6 +54,7 @@ pw_source_set("uart_transport") {
"$dir_pw_bytes:bit",
dir_pw_bytes,
dir_pw_function,
dir_pw_span,
dir_pw_status,
]
}
Expand Down
1 change: 1 addition & 0 deletions pw_bytes/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pw_source_set("pw_bytes") {
"$dir_pw_bytes:bit",
"$dir_pw_containers:iterator",
dir_pw_preprocessor,
dir_pw_span,
dir_pw_status,
]
}
Expand Down
5 changes: 4 additions & 1 deletion pw_checksum/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ pw_source_set("pw_checksum") {
"crc16_ccitt.cc",
"crc32.cc",
]
public_deps = [ dir_pw_bytes ]
public_deps = [
dir_pw_bytes,
dir_pw_span,
]
}

pw_test_group("tests") {
Expand Down
3 changes: 2 additions & 1 deletion pw_containers/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pw_test("algorithm_test") {
":algorithm",
":intrusive_list",
":vector",
"$dir_pw_polyfill:span",
dir_pw_span,
]
}

Expand All @@ -108,6 +108,7 @@ pw_test("filtered_view_test") {
deps = [
":filtered_view",
":intrusive_list",
dir_pw_span,
]
}

Expand Down
5 changes: 4 additions & 1 deletion pw_cpu_exception/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ pw_facade("handler") {
pw_facade("support") {
backend = pw_cpu_exception_SUPPORT_BACKEND
public_configs = [ ":public_include_path" ]
public_deps = [ ":entry" ]
public_deps = [
":entry",
dir_pw_span,
]
public = [ "public/pw_cpu_exception/support.h" ]
}

Expand Down
2 changes: 2 additions & 0 deletions pw_cpu_exception_cortex_m/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pw_source_set("support") {
"$dir_pw_cpu_exception:support.facade",
"$dir_pw_preprocessor:arch",
dir_pw_log,
dir_pw_span,
dir_pw_string,
]
sources = [ "support.cc" ]
Expand Down Expand Up @@ -220,6 +221,7 @@ pw_test("cpu_exception_entry_test") {
"$dir_pw_cpu_exception:entry",
"$dir_pw_cpu_exception:handler",
"$dir_pw_cpu_exception:support",
dir_pw_span,
]
sources = [ "exception_entry_test.cc" ]
}
Expand Down
1 change: 1 addition & 0 deletions pw_file/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pw_source_set("flat_file_system") {
dir_pw_bytes,
dir_pw_log,
dir_pw_result,
dir_pw_span,
dir_pw_status,
]
public_configs = [ ":public_includes" ]
Expand Down
5 changes: 3 additions & 2 deletions pw_fuzzer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ pw_doc_group("docs") {
pw_fuzzer("toy_fuzzer") {
sources = [ "examples/toy_fuzzer.cc" ]
deps = [
"$dir_pw_result",
"$dir_pw_string",
dir_pw_result,
dir_pw_span,
dir_pw_string,
]
}

Expand Down
3 changes: 3 additions & 0 deletions pw_hdlc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pw_source_set("decoder") {
dir_pw_bytes,
dir_pw_checksum,
dir_pw_result,
dir_pw_span,
dir_pw_status,
]
deps = [ dir_pw_log ]
Expand All @@ -63,6 +64,7 @@ pw_source_set("encoder") {
":common",
dir_pw_bytes,
dir_pw_checksum,
dir_pw_span,
dir_pw_status,
dir_pw_stream,
]
Expand All @@ -75,6 +77,7 @@ pw_source_set("rpc_channel_output") {
public_deps = [
":pw_hdlc",
"$dir_pw_rpc:server",
dir_pw_span,
]
}

Expand Down
1 change: 1 addition & 0 deletions pw_hex_dump/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pw_source_set("pw_hex_dump") {
public_configs = [ ":default_config" ]
public_deps = [
dir_pw_bytes,
dir_pw_span,
dir_pw_status,
]
deps = [ dir_pw_string ]
Expand Down
1 change: 1 addition & 0 deletions pw_i2c/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pw_source_set("device") {
"$dir_pw_bytes",
"$dir_pw_chrono:system_clock",
"$dir_pw_status",
dir_pw_span,
]
}

Expand Down
2 changes: 2 additions & 0 deletions pw_kvs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pw_source_set("pw_kvs") {
dir_pw_assert,
dir_pw_bytes,
dir_pw_containers,
dir_pw_span,
dir_pw_status,
dir_pw_stream,
]
Expand All @@ -87,6 +88,7 @@ pw_source_set("crc16") {
public_deps = [
":pw_kvs",
dir_pw_checksum,
dir_pw_span,
]
}

Expand Down
1 change: 1 addition & 0 deletions pw_log/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pw_source_set("proto_utils") {
"$dir_pw_log:protos.pwpb",
"$dir_pw_log_tokenized:metadata",
"$dir_pw_result",
dir_pw_span,
]
deps = [ "$dir_pw_protobuf" ]
sources = [ "proto_utils.cc" ]
Expand Down
2 changes: 2 additions & 0 deletions pw_log_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pw_source_set("log_filter") {
"$dir_pw_log:protos.pwpb",
"$dir_pw_protobuf",
"$dir_pw_status",
dir_pw_span,
]
}

Expand All @@ -112,6 +113,7 @@ pw_source_set("rpc_log_drain") {
"$dir_pw_status",
"$dir_pw_sync:lock_annotations",
"$dir_pw_sync:mutex",
dir_pw_span,
]
}

Expand Down
1 change: 1 addition & 0 deletions pw_log_tokenized/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pw_source_set("base64_over_hdlc") {
"$dir_pw_stream:sys_io_stream",
"$dir_pw_tokenizer:base64",
"$dir_pw_tokenizer:global_handler_with_payload.facade",
dir_pw_span,
]
}

Expand Down
2 changes: 2 additions & 0 deletions pw_malloc_freelist/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pw_source_set("pw_malloc_freelist") {
"$dir_pw_allocator:freelist_heap",
"$dir_pw_malloc:facade",
"$dir_pw_preprocessor",
dir_pw_span,
]
sources = [ "freelist_malloc.cc" ]
}
Expand All @@ -44,6 +45,7 @@ pw_test("freelist_malloc_test") {
deps = [
"$dir_pw_allocator",
"$dir_pw_malloc",
dir_pw_span,
]
sources = [ "freelist_malloc_test.cc" ]
}
Expand Down
2 changes: 2 additions & 0 deletions pw_metric/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pw_source_set("pw_metric") {
dir_pw_log,
dir_pw_tokenizer,
]
deps = [ dir_pw_span ]
}

# This gives access to the "PW_METRIC_GLOBAL()" macros, for globally-registered
Expand Down Expand Up @@ -66,6 +67,7 @@ if (dir_pw_third_party_nanopb != "") {
public_deps = [
":metric_service_proto.nanopb_rpc",
":pw_metric",
dir_pw_span,
]
public = [ "public/pw_metric/metric_service_nanopb.h" ]
deps = [
Expand Down
1 change: 1 addition & 0 deletions pw_minimal_cpp_stdlib/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pw_source_set("pw_minimal_cpp_stdlib") {
"public/internal/type_traits.h",
"public/internal/utility.h",
]
public_deps = [ dir_pw_polyfill ]
}

pw_test_group("tests") {
Expand Down
1 change: 1 addition & 0 deletions pw_persistent_ram/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pw_source_set("pw_persistent_ram") {
dir_pw_bytes,
dir_pw_checksum,
dir_pw_preprocessor,
dir_pw_span,
dir_pw_stream,
]
}
Expand Down
1 change: 1 addition & 0 deletions pw_protobuf/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pw_source_set("pw_protobuf") {
dir_pw_function,
dir_pw_log,
dir_pw_result,
dir_pw_span,
dir_pw_status,
dir_pw_stream,
dir_pw_varint,
Expand Down
1 change: 1 addition & 0 deletions pw_random/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pw_source_set("pw_random") {
]
public_deps = [
dir_pw_bytes,
dir_pw_span,
dir_pw_status,
]
}
Expand Down
1 change: 1 addition & 0 deletions pw_ring_buffer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pw_source_set("pw_ring_buffer") {
deps = [
"$dir_pw_assert:pw_assert",
"$dir_pw_varint",
dir_pw_span,
]
}

Expand Down
8 changes: 7 additions & 1 deletion pw_router/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pw_source_set("static_router") {
":egress",
":packet_parser",
dir_pw_metric,
dir_pw_span,
]
public = [ "public/pw_router/static_router.h" ]
sources = [ "static_router.cc" ]
Expand All @@ -41,13 +42,17 @@ pw_source_set("egress") {
public_deps = [
":packet_parser",
dir_pw_bytes,
dir_pw_span,
]
}

pw_source_set("packet_parser") {
public_configs = [ ":public_include_path" ]
public = [ "public/pw_router/packet_parser.h" ]
public_deps = [ dir_pw_bytes ]
public_deps = [
dir_pw_bytes,
dir_pw_span,
]
}

pw_source_set("egress_function") {
Expand All @@ -56,6 +61,7 @@ pw_source_set("egress_function") {
public_deps = [
":egress",
dir_pw_function,
dir_pw_span,
]
}

Expand Down
2 changes: 2 additions & 0 deletions pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pw_source_set("client") {
public_deps = [
":common",
dir_pw_result,
dir_pw_span,
]
deps = [
":log_config",
Expand Down Expand Up @@ -153,6 +154,7 @@ pw_source_set("common") {
dir_pw_assert,
dir_pw_bytes,
dir_pw_function,
dir_pw_span,
dir_pw_status,
]

Expand Down
Loading

0 comments on commit 1c974a1

Please sign in to comment.