commit | 1f2d18ffa7978492a753fbb8228572cd7ad598cc | [log] [tgz] |
---|---|---|
author | Matthew Sedam <matthewsedam@google.com> | Tue Jun 03 10:31:01 2025 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 03 10:31:01 2025 -0700 |
tree | b498137a40fa930320966d3ea43f31e51c48df05 | |
parent | b494ca441d297b6ed994727b3e06ff03b81dfb20 [diff] |
pw_log_android: Fix LOG_TAG redefinition issue This CL fixes the following errors: 1. When Pigweed dependencies are included in system headers, such as in libutils, that are eventually included in .cc files where the header is included before LOG_TAG is defined, then the build will fail due to -Wmacro-redefined, -Werror. 2. Since we included log/log.h before defining LOG_TAG, log/log.h will define LOG_TAG as NULL, so it will always be defined. So, either the user will define LOG_TAG before including these Pigweed headers or log.h will define it as NULL -> the Pigweed module name will never be used. 3. Using android/log.h will allow Pigweed code that depends on pw_log_android (all by default) to work with NDK code. Bug: 416545855 Test: Build in Android Change-Id: Ie7d460b9f328c3cce68522478ad428c47672198e Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/295040 Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Commit-Queue: Matthew Sedam <matthewsedam@google.com> Docs-Not-Needed: Matthew Sedam <matthewsedam@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Tests-Not-Needed: Matthew Sedam <matthewsedam@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/.