commit | 886717437a55489898c03c89e69186a5efb877aa | [log] [tgz] |
---|---|---|
author | Taylor Cramer <cramertj@google.com> | Tue Jun 13 19:52:37 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 13 19:52:37 2023 +0000 |
tree | 984d6cd7c0d015fd0f7d53036802b4f1cbe5fa4d | |
parent | 734cbf0a461a30fb1631c4a14b8a11737716a3d2 [diff] |
pw_build: Add `enable_if` to missing backend error A dependency on a facade in a toolchain with a missing backend commonly occurs by depending on the facade in a test. This change suggests using `enable_if` to enable the test only when a backend is provided. Tested: removed an existing `enable_if` and saw this error: ERR Build error for //pw_chrono:system_clock.NO_BACKEND_SET(//targets/stm32f429i_disc1:stm32f429i_disc1_debug): ERR ERR Attempted to build the //pw_chrono:system_clock facade with no backend. ERR ERR If you are using this facade, ensure you have configured a backend ERR properly. The build arg for the facade must be set to a valid ERR backend in the toolchain. For example, you may need to add a line ERR like the following to the toolchain's .gni file: ERR ERR pw_chrono_<FACADE_NAME>_BACKEND = "//path/to/the:backend" ERR ERR Alternatively, if the target depending on this facade is a <wrapped> `pw_test` ERR which should only be built in toolchains with a provided backend, ERR consider adding an `enable_if` to the dependent target: ERR ERR pw_test(...) { ERR enable_if = pw_chrono_<FACADE_NAME>_BACKEND != "" ERR ... ERR } ERR ERR If you are NOT using this facade, this error may have been <wrapped> triggered ERR by trying to build all targets. ERR ERR Dependency path to this target: ERR ERR gn path out //:default "//pw_chrono:system_clock.NO_BACKEND_SET(//targets/stm32f429i_disc1:stm32f429i_disc1_debug)" Change-Id: I57324a88afa65528a230840cb939c15236a21703 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/151651 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Pigweed-Auto-Submit: Taylor Cramer <cramertj@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.