diff options
author | Ted Pudlik <tpudlik@google.com> | 2023-02-28 01:39:35 +0000 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-02-28 01:39:35 +0000 |
commit | 35e5838ac4d12cd7a0134cef9322f696493e43e0 (patch) | |
tree | 15cf17fd4a46802852656b31da844e562dbd0d5a | |
parent | 5ee7b601816073784966850a4302eaee55d29f8f (diff) | |
download | pigweed-35e5838ac4d12cd7a0134cef9322f696493e43e0.tar.gz |
pw_system: Bazel build fixes
Bug: b/255431090
Change-Id: I16c2a48afd4072eb0d958380917f75ecdabff1e1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/130951
Reviewed-by: Keir Mierle <keir@google.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
-rw-r--r-- | pw_system/BUILD.bazel | 19 | ||||
-rw-r--r-- | pw_system/freertos_target_hooks.cc | 1 |
2 files changed, 14 insertions, 6 deletions
diff --git a/pw_system/BUILD.bazel b/pw_system/BUILD.bazel index 222dfe664..a54b21bd8 100644 --- a/pw_system/BUILD.bazel +++ b/pw_system/BUILD.bazel @@ -149,7 +149,7 @@ pw_cc_library( deps = [ ":log", ":rpc_server", - ":target_hooks_headers", + ":target_hooks", ":thread_snapshot_service", ":work_queue", "//pw_metric:global", @@ -233,10 +233,7 @@ pw_cc_library( visibility = ["@pigweed_config//:__pkg__"], deps = select({ "//pw_build/constraints/rtos:freertos": [":freertos_target_hooks"], - "//conditions:default": [ - ":stl_target_hooks", - "//targets/host_device_simulator:boot", - ], + "//conditions:default": [":stl_target_hooks"], }), ) @@ -260,15 +257,27 @@ pw_cc_library( "//pw_build/constraints/rtos:freertos", ], deps = [ + ":target_hooks_headers", "//pw_thread:thread", "//pw_thread_freertos:thread", ], ) +# TODO(b/234877642): This is broken out into a separate pw_cc_library target as +# a workaround for pw_cc_binary not supporting `select` in its deps. +pw_cc_library( + name = "boot", + deps = select({ + "//pw_build/constraints/rtos:freertos": [], + "//conditions:default": ["//targets/host_device_simulator:boot"], + }), +) + pw_cc_binary( name = "system_example", srcs = ["example_user_app_init.cc"], deps = [ + ":boot", ":init", ":io", ":target_hooks", diff --git a/pw_system/freertos_target_hooks.cc b/pw_system/freertos_target_hooks.cc index d923576ed..d533308a6 100644 --- a/pw_system/freertos_target_hooks.cc +++ b/pw_system/freertos_target_hooks.cc @@ -13,7 +13,6 @@ // the License. #include "FreeRTOS.h" -#include "pw_system/init.h" #include "pw_thread/detached_thread.h" #include "pw_thread/thread.h" #include "pw_thread_freertos/context.h" |