diff options
author | Nathaniel Brough <nathaniel.brough@gmail.com> | 2021-04-18 22:52:00 +0800 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-05-01 16:57:23 +0000 |
commit | c2d5781a76268bfdc00b2f5232bf3e7c1129bf37 (patch) | |
tree | c74a60863c6a407d5871677d0468eac330d22abe /pw_sys_io | |
parent | 3d0e3152db29c24a75464b069557aab72a389595 (diff) | |
download | pigweed-c2d5781a76268bfdc00b2f5232bf3e7c1129bf37.tar.gz |
workspace: Switches Bazel builds to using facades
Switches over all packages that were previously working with Bazel
to use the new facades API. In the process of doing this a few new
modules where newly compatible with Bazel. This is reflected in the
changes to the presubmit.
Change-Id: I12aa67fa43b9ac2b947f33814f901dd00f929543
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/41561
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Akira Baruah <akirabaruah@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
Diffstat (limited to 'pw_sys_io')
-rw-r--r-- | pw_sys_io/BUILD | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pw_sys_io/BUILD b/pw_sys_io/BUILD index 11e8201c6..cf1ecc3f5 100644 --- a/pw_sys_io/BUILD +++ b/pw_sys_io/BUILD @@ -14,6 +14,7 @@ load( "//pw_build:pigweed.bzl", + "pw_cc_facade", "pw_cc_library", ) @@ -21,7 +22,7 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) -pw_cc_library( +pw_cc_facade( name = "facade", hdrs = ["public/pw_sys_io/sys_io.h"], includes = ["public"], @@ -48,8 +49,16 @@ pw_cc_library( ":facade", "//pw_span", "//pw_status", - # For now, hard-code to depend on stdio until bazel build is updated - # to support multiple target configurations. - "//pw_sys_io_stdio", + "@pigweed_config//:pw_sys_io_backend", ], ) + +pw_cc_library( + name = "backend_multiplexer", + visibility = ["@pigweed_config//:__pkg__"], + deps = select({ + "//pw_build/constraints/chipset:stm32f429": ["@pigweed//pw_sys_io_baremetal_stm32f429"], + "//pw_build/constraints/chipset:lm3s6965evb": ["@pigweed//pw_sys_io_baremetal_lm3s6965evb"], + "//conditions:default": ["@pigweed//pw_sys_io_stdio"], + }), +) |