Skip to content

Commit

Permalink
pw_assert_fuchsia: Split assert and check backends
Browse files Browse the repository at this point in the history
Bug: 350585010
Bug: 378564135
Bug: 390694482
Change-Id: I4e1f3d5849df7eba7ec1ebc5393b1d77f1e56f30
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/261752
Lint: Lint 🤖 <[email protected]>
Docs-Not-Needed: Ted Pudlik <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
Commit-Queue: Ted Pudlik <[email protected]>
  • Loading branch information
tpudlik authored and CQ Bot Account committed Jan 22, 2025
1 parent 9d052b2 commit c040ce6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
41 changes: 33 additions & 8 deletions pw_assert_fuchsia/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,52 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])

cc_library(
name = "pw_assert_fuchsia",
name = "assert_backend",
srcs = [
"assert.cc",
],
hdrs = [
"assert_public_overrides/pw_assert_backend/assert_backend.h",
"check_public_overrides/pw_assert_backend/check_backend.h",
],
strip_include_prefix = "assert_public_overrides",
target_compatible_with = ["@platforms//os:fuchsia"],
deps = [
":assert_backend_private",
],
)

cc_library(
name = "assert_backend_private",
hdrs = [
"public/pw_assert_fuchsia/assert_backend.h",
"public/pw_assert_fuchsia/check_backend.h",
],
includes = [
"assert_public_overrides",
"check_public_overrides",
"public",
strip_include_prefix = "public",
target_compatible_with = ["@platforms//os:fuchsia"],
visibility = ["//visibility:private"],
)

cc_library(
name = "check_backend",
hdrs = [
"check_public_overrides/pw_assert_backend/check_backend.h",
],
strip_include_prefix = "check_public_overrides",
target_compatible_with = ["@platforms//os:fuchsia"],
deps = [
"//pw_assert:facade",
":check_backend_private",
],
)

cc_library(
name = "check_backend_private",
hdrs = [
"public/pw_assert_fuchsia/check_backend.h",
],
strip_include_prefix = "public",
target_compatible_with = ["@platforms//os:fuchsia"],
visibility = ["//visibility:private"],
)

sphinx_docs_library(
name = "docs",
srcs = [
Expand Down
4 changes: 2 additions & 2 deletions pw_bluetooth_sapphire/fuchsia/backends.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
common --@rules_fuchsia//fuchsia/flags:fuchsia_targets_enabled=false
common:fuchsia --@rules_fuchsia//fuchsia/flags:fuchsia_targets_enabled

common:fuchsia --@pigweed//pw_assert:backend=@pigweed//pw_assert_fuchsia
common:fuchsia --@pigweed//pw_assert:assert_backend=@pigweed//pw_assert_fuchsia:assert_backend
common:fuchsia --@pigweed//pw_assert:assert_backend_impl=@pigweed//pw_build:empty_cc_library
common:fuchsia --@pigweed//pw_assert:check_backend=@pigweed//pw_assert_fuchsia
common:fuchsia --@pigweed//pw_assert:check_backend=@pigweed//pw_assert_fuchsia:check_backend
common:fuchsia --@pigweed//pw_assert:check_backend_impl=@pigweed//pw_build:empty_cc_library
common:fuchsia --@pigweed//pw_chrono:system_clock_backend=@pigweed//pw_chrono_stl:system_clock
common:fuchsia --@pigweed//pw_log:backend=@pigweed//pw_log_fuchsia
Expand Down
1 change: 0 additions & 1 deletion pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,6 @@ def owners_lint_checks(ctx: PresubmitContext):
# TODO: https://pwbug.dev/378564135 - Burn this list down.
INCLUDE_CHECK_EXCEPTIONS = (
# keep-sorted: start
"//pw_assert_fuchsia:pw_assert_fuchsia",
"//pw_assert_log:assert_backend",
"//pw_assert_log:check_and_assert_backend",
"//pw_assert_log:check_backend",
Expand Down

0 comments on commit c040ce6

Please sign in to comment.