From 2e61d808d3030841eae8f77962ed068b4f908114 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 28 Sep 2023 11:47:19 -0400 Subject: [PATCH] Add Span.h to a source_set that tracks its dependencies. This requires that those dependencies be separate things that are not the entire "support" library, because some things need Span but can't depend on all of "support". Fixes https://github.com/project-chip/connectedhomeip/issues/29490 --- examples/chip-tool/BUILD.gn | 1 + examples/darwin-framework-tool/BUILD.gn | 1 + examples/pigweed-app/ameba/chip_main.cmake | 1 + examples/placeholder/linux/BUILD.gn | 1 + src/credentials/BUILD.gn | 11 +--- src/lib/support/BUILD.gn | 50 +++++++++++++++++-- src/lib/support/CodeUtils.h | 17 ------- src/lib/support/VerificationMacrosNoLogging.h | 17 +++++++ src/lib/support/logging/TextOnlyLogging.cpp | 3 +- src/lib/support/logging/TextOnlyLogging.h | 1 + src/platform/ASR/BUILD.gn | 1 + src/platform/Ameba/BUILD.gn | 1 + src/platform/Beken/BUILD.gn | 1 + src/platform/Darwin/BUILD.gn | 4 +- src/platform/ESP32/BUILD.gn | 1 + src/platform/Infineon/CYW30739/BUILD.gn | 5 +- src/platform/Infineon/PSOC6/BUILD.gn | 1 + src/platform/Linux/BUILD.gn | 5 +- src/platform/Tizen/BUILD.gn | 5 +- src/platform/Zephyr/BUILD.gn | 3 +- src/platform/bouffalolab/BL602/BUILD.gn | 1 + src/platform/bouffalolab/BL702/BUILD.gn | 8 +-- src/platform/bouffalolab/BL702L/BUILD.gn | 4 +- src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn | 2 +- src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn | 2 +- src/platform/logging/BUILD.gn | 2 + src/platform/mbed/BUILD.gn | 1 + src/platform/mt793x/BUILD.gn | 3 +- src/platform/nrfconnect/BUILD.gn | 3 +- src/platform/nxp/k32w/k32w0/BUILD.gn | 2 +- src/platform/nxp/k32w/k32w1/BUILD.gn | 2 +- src/platform/nxp/mw320/BUILD.gn | 2 +- src/platform/openiotsdk/BUILD.gn | 2 + src/platform/qpg/BUILD.gn | 2 +- src/platform/silabs/SiWx917/BUILD.gn | 1 + src/platform/silabs/efr32/BUILD.gn | 3 +- src/platform/stm32/BUILD.gn | 5 +- src/platform/telink/BUILD.gn | 3 +- src/platform/webos/BUILD.gn | 5 +- 39 files changed, 126 insertions(+), 57 deletions(-) diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index dd23678cccb51d..7a652661616296 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -89,6 +89,7 @@ static_library("chip-tool-utils") { sources += [ "commands/interactive/InteractiveCommands.cpp" ] deps += [ "${chip_root}/examples/common/websocket-server", + "${chip_root}/src/platform/logging:headers", "${editline_root}:editline", ] } diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 10993a8dedf17b..3f0de6c6b0310b 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -217,6 +217,7 @@ executable("darwin-framework-tool") { deps += [ "${chip_root}/examples/common/websocket-server", + "${chip_root}/src/platform/logging:headers", "${editline_root}:editline", ] } diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index d70bbb7b0c1ce4..525817b00c6b71 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -60,6 +60,7 @@ target_include_directories( ${pigweed_dir}/pw_rpc/nanopb/public ${chip_dir_output}/gen/include + ${chip_dir}/third_party/nlassert/repo/include/ ) target_link_libraries(${chip_main} PUBLIC diff --git a/examples/placeholder/linux/BUILD.gn b/examples/placeholder/linux/BUILD.gn index f2c743a9d7641a..a983cdc4fafe62 100644 --- a/examples/placeholder/linux/BUILD.gn +++ b/examples/placeholder/linux/BUILD.gn @@ -46,6 +46,7 @@ executable("chip-${chip_tests_zap_config}") { "${chip_root}/src/lib", "${chip_root}/src/lib/support:testing", # For sleepMillis. TODO: this is # odd and should be fixed + "${chip_root}/src/platform/logging:headers", "${chip_root}/third_party/jsoncpp", ] diff --git a/src/credentials/BUILD.gn b/src/credentials/BUILD.gn index 2abc6e2795fd38..4e4cb93fe9965c 100644 --- a/src/credentials/BUILD.gn +++ b/src/credentials/BUILD.gn @@ -134,16 +134,7 @@ source_set("test_paa_store") { "attestation_verifier/TestPAAStore.h", ] - public_deps = [ - "${chip_root}/src/lib/core:chip_config_header", # for lib/support/Span.h - "${nlassert_root}:nlassert", # for lib/support/Span.h - ] - if (chip_pw_tokenizer_logging) { - import("//build_overrides/pigweed.gni") - public_deps += [ - "${dir_pw_tokenizer}", # for /lib/support/Span.h - ] - } + public_deps = [ "${chip_root}/src/lib/support:span" ] } static_library("default_attestation_verifier") { diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index e516b6e412280a..c1118ef0aa588b 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -107,6 +107,49 @@ source_set("memory") { ] } +source_set("text_only_logging") { + sources = [ + "logging/TextOnlyLogging.cpp", + "logging/TextOnlyLogging.h", + ] + + public_deps = [ + ":attributes", + ":logging_constants", + ":verifymacros_no_logging", + "${chip_root}/src/lib/core:chip_config_header", + ] + + if (chip_pw_tokenizer_logging) { + public_deps += [ "${dir_pw_tokenizer}" ] + } + + deps = [ + ":memory", + "${chip_root}/src/lib/core:chip_config_header", + "${chip_root}/src/platform/logging:headers", + ] +} + +source_set("verifymacros") { + sources = [ "CodeUtils.h" ] + + public_deps = [ + ":attributes", + ":text_only_logging", + ":verifymacros_no_logging", + "${chip_root}/src/lib/core:chip_config_header", + "${chip_root}/src/lib/core:error", + "${nlassert_root}:nlassert", + ] +} + +source_set("span") { + sources = [ "Span.h" ] + + public_deps = [ ":verifymacros" ] +} + source_set("chip_version_header") { sources = get_target_outputs(":gen_chip_version") @@ -132,7 +175,6 @@ static_library("support") { "CHIPArgParser.cpp", "CHIPCounter.h", "CHIPMemString.h", - "CodeUtils.h", "DLLUtil.h", "DefaultStorageKeyAllocator.h", "Defer.h", @@ -172,8 +214,6 @@ static_library("support") { "logging/BinaryLogging.cpp", "logging/BinaryLogging.h", "logging/CHIPLogging.h", - "logging/TextOnlyLogging.cpp", - "logging/TextOnlyLogging.h", "verhoeff/Verhoeff.cpp", "verhoeff/Verhoeff.h", "verhoeff/Verhoeff10.cpp", @@ -203,11 +243,13 @@ static_library("support") { ":logging_constants", ":memory", ":safeint", + ":span", + ":text_only_logging", + ":verifymacros", ":verifymacros_no_logging", "${chip_root}/src/lib/core:chip_config_header", "${chip_root}/src/lib/core:error", "${chip_root}/src/platform:platform_buildconfig", - "${chip_root}/src/platform/logging:headers", "${nlassert_root}:nlassert", "${nlio_root}:nlio", ] diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index bbb18544c3ead6..58094a01731c37 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -154,23 +154,6 @@ constexpr inline const _T & max(const _T & a, const _T & b) } // namespace chip -/** - * @def IgnoreUnusedVariable(aVariable) - * - * @brief - * This casts the specified @a aVariable to void to quell any - * compiler-issued unused variable warnings or errors. - * - * @code - * void foo (int err) - * { - * IgnoreUnusedVariable(err) - * } - * @endcode - * - */ -#define IgnoreUnusedVariable(aVariable) ((void) (aVariable)) - /** * @def ReturnErrorOnFailure(expr) * diff --git a/src/lib/support/VerificationMacrosNoLogging.h b/src/lib/support/VerificationMacrosNoLogging.h index 8846390557c611..0def85eaed3ba4 100644 --- a/src/lib/support/VerificationMacrosNoLogging.h +++ b/src/lib/support/VerificationMacrosNoLogging.h @@ -25,3 +25,20 @@ #include #define VerifyOrDieWithoutLogging(aCondition) nlABORT(aCondition) + +/** + * @def IgnoreUnusedVariable(aVariable) + * + * @brief + * This casts the specified @a aVariable to void to quell any + * compiler-issued unused variable warnings or errors. + * + * @code + * void foo (int err) + * { + * IgnoreUnusedVariable(err) + * } + * @endcode + * + */ +#define IgnoreUnusedVariable(aVariable) ((void) (aVariable)) diff --git a/src/lib/support/logging/TextOnlyLogging.cpp b/src/lib/support/logging/TextOnlyLogging.cpp index 04ac20f351acab..738f4c81bac152 100644 --- a/src/lib/support/logging/TextOnlyLogging.cpp +++ b/src/lib/support/logging/TextOnlyLogging.cpp @@ -24,9 +24,8 @@ #include "TextOnlyLogging.h" -#include +#include #include -#include #include diff --git a/src/lib/support/logging/TextOnlyLogging.h b/src/lib/support/logging/TextOnlyLogging.h index a754106935ea9d..a59946c2aab4c8 100644 --- a/src/lib/support/logging/TextOnlyLogging.h +++ b/src/lib/support/logging/TextOnlyLogging.h @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/src/platform/ASR/BUILD.gn b/src/platform/ASR/BUILD.gn index 8931e3ebd5f664..eff3c98881cf94 100755 --- a/src/platform/ASR/BUILD.gn +++ b/src/platform/ASR/BUILD.gn @@ -72,6 +72,7 @@ static_library("ASR") { deps = [ "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] diff --git a/src/platform/Ameba/BUILD.gn b/src/platform/Ameba/BUILD.gn index 9e240a0e110c5e..ff05b1fdeb165a 100755 --- a/src/platform/Ameba/BUILD.gn +++ b/src/platform/Ameba/BUILD.gn @@ -54,6 +54,7 @@ static_library("Ameba") { deps = [ "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] diff --git a/src/platform/Beken/BUILD.gn b/src/platform/Beken/BUILD.gn index 5e21bf5f41f73a..75cbf7b96e09e6 100755 --- a/src/platform/Beken/BUILD.gn +++ b/src/platform/Beken/BUILD.gn @@ -52,6 +52,7 @@ static_library("Beken") { deps = [ "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] diff --git a/src/platform/Darwin/BUILD.gn b/src/platform/Darwin/BUILD.gn index 1769d4a29f3576..11372cb5f4c627 100644 --- a/src/platform/Darwin/BUILD.gn +++ b/src/platform/Darwin/BUILD.gn @@ -98,6 +98,7 @@ static_library("Darwin") { deps = [ ":logging", "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] @@ -137,10 +138,9 @@ static_library("logging") { ] deps = [ - "${chip_root}/src/lib/core:chip_config_header", # for lib/support/Span.h "${chip_root}/src/lib/support:attributes", "${chip_root}/src/lib/support:logging_constants", - "${nlassert_root}:nlassert", # for lib/support/Span.h + "${chip_root}/src/lib/support:span", ] configs += [ "${chip_root}/src:includes" ] diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 1d27940db829fa..0a9c9b7dbaef20 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -65,6 +65,7 @@ static_library("ESP32") { deps = [ "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] diff --git a/src/platform/Infineon/CYW30739/BUILD.gn b/src/platform/Infineon/CYW30739/BUILD.gn index 2af62c34d6accc..51a3be470e36c3 100644 --- a/src/platform/Infineon/CYW30739/BUILD.gn +++ b/src/platform/Infineon/CYW30739/BUILD.gn @@ -63,7 +63,10 @@ static_library("CYW30739") { ] } - deps = [ "${chip_root}/src/crypto" ] + deps = [ + "${chip_root}/src/crypto", + "${chip_root}/src/platform/logging:headers", + ] public = [ "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", diff --git a/src/platform/Infineon/PSOC6/BUILD.gn b/src/platform/Infineon/PSOC6/BUILD.gn index 614b0f849c7b5b..0d159bacf421c0 100644 --- a/src/platform/Infineon/PSOC6/BUILD.gn +++ b/src/platform/Infineon/PSOC6/BUILD.gn @@ -69,6 +69,7 @@ static_library("PSOC6") { deps = [ "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", "${chip_root}/src/setup_payload", ] diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn index 56324ff5c4a494..2dca5182a8632b 100644 --- a/src/platform/Linux/BUILD.gn +++ b/src/platform/Linux/BUILD.gn @@ -73,8 +73,11 @@ static_library("Linux") { "SystemTimeSupport.cpp", ] + deps = [ "${chip_root}/src/setup_payload" ] + if (!chip_use_external_logging) { sources += [ "Logging.cpp" ] + deps += [ "${chip_root}/src/platform/logging:headers" ] } if (chip_enable_openthread) { @@ -96,8 +99,6 @@ static_library("Linux") { ] } - deps = [ "${chip_root}/src/setup_payload" ] - public_deps = [ "${chip_root}/src/app/common:cluster-objects", "${chip_root}/src/platform:platform_base", diff --git a/src/platform/Tizen/BUILD.gn b/src/platform/Tizen/BUILD.gn index 12b7ab03352575..eb2df408099114 100644 --- a/src/platform/Tizen/BUILD.gn +++ b/src/platform/Tizen/BUILD.gn @@ -63,7 +63,10 @@ static_library("Tizen") { "SystemTimeSupport.cpp", ] - deps = [ "${chip_root}/src/setup_payload" ] + deps = [ + "${chip_root}/src/platform/logging:headers", + "${chip_root}/src/setup_payload", + ] public_deps = [ "${chip_root}/src/platform:platform_base", diff --git a/src/platform/Zephyr/BUILD.gn b/src/platform/Zephyr/BUILD.gn index 951c6f1f5cc90b..425649e4d452ee 100644 --- a/src/platform/Zephyr/BUILD.gn +++ b/src/platform/Zephyr/BUILD.gn @@ -52,6 +52,7 @@ static_library("Zephyr") { ] public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] if (chip_enable_openthread) { sources += [ @@ -66,7 +67,7 @@ static_library("Zephyr") { "../OpenThread/OpenThreadDnssdImpl.cpp", "../OpenThread/OpenThreadDnssdImpl.h", ] - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } } diff --git a/src/platform/bouffalolab/BL602/BUILD.gn b/src/platform/bouffalolab/BL602/BUILD.gn index d1ebdcde2fde73..5fd3aceff1deee 100644 --- a/src/platform/bouffalolab/BL602/BUILD.gn +++ b/src/platform/bouffalolab/BL602/BUILD.gn @@ -69,6 +69,7 @@ static_library("BL602") { deps = [ "${chip_root}/src/credentials:credentials_header", "${chip_root}/src/lib/dnssd:platform_header", + "${chip_root}/src/platform/logging:headers", ] public_deps = [ "${chip_root}/src/platform:platform_base" ] } diff --git a/src/platform/bouffalolab/BL702/BUILD.gn b/src/platform/bouffalolab/BL702/BUILD.gn index e5e71e909afc35..8582019df301e7 100644 --- a/src/platform/bouffalolab/BL702/BUILD.gn +++ b/src/platform/bouffalolab/BL702/BUILD.gn @@ -59,6 +59,8 @@ static_library("BL702") { ] } + deps = [ "${chip_root}/src/platform/logging:headers" ] + defines = [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ] if (chip_enable_factory_data || chip_enable_factory_data_test) { @@ -76,7 +78,7 @@ static_library("BL702") { "wifi_mgmr_portable.c", ] - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } if (chip_enable_openthread) { @@ -84,7 +86,7 @@ static_library("BL702") { import("//build_overrides/bouffalolab_iot_sdk.gni") import("${bouffalolab_iot_sdk_build_root}/bl702/bl_iot_sdk.gni") - deps = [ "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" ] + deps += [ "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" ] sources += [ "../../OpenThread/OpenThreadUtils.cpp", @@ -108,7 +110,7 @@ static_library("BL702") { "EthernetInterface.c", ] - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } deps += [ "${chip_root}/src/credentials:credentials_header" ] diff --git a/src/platform/bouffalolab/BL702L/BUILD.gn b/src/platform/bouffalolab/BL702L/BUILD.gn index 691c46b8d84069..547b9c695730c5 100644 --- a/src/platform/bouffalolab/BL702L/BUILD.gn +++ b/src/platform/bouffalolab/BL702L/BUILD.gn @@ -57,6 +57,8 @@ static_library("BL702L") { ] } + deps = [ "${chip_root}/src/platform/logging:headers" ] + defines = [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ] if (chip_enable_factory_data || chip_enable_factory_data_test) { @@ -71,7 +73,7 @@ static_library("BL702L") { import("//build_overrides/bouffalolab_iot_sdk.gni") import("${bouffalolab_iot_sdk_build_root}/bl702l/bl_iot_sdk.gni") - deps = [ "${bouffalolab_iot_sdk_build_root}/bl702l:bl_iot_sdk" ] + deps += [ "${bouffalolab_iot_sdk_build_root}/bl702l:bl_iot_sdk" ] sources += [ "../../OpenThread/OpenThreadUtils.cpp", diff --git a/src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn b/src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn index 84c3ae9981e40b..18dfc7dff0bf58 100644 --- a/src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn +++ b/src/platform/cc13xx_26xx/cc13x2_26x2/BUILD.gn @@ -46,7 +46,7 @@ static_library("cc13x2_26x2") { "SystemPlatformConfig.h", ] - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] public_deps = [ "${chip_root}/src/crypto", diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn b/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn index ad8a73782a086c..1dd6933b2f23ca 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn @@ -46,7 +46,7 @@ static_library("cc13x4_26x4") { "SystemPlatformConfig.h", ] - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] public_deps = [ "${chip_root}/src/crypto", diff --git a/src/platform/logging/BUILD.gn b/src/platform/logging/BUILD.gn index 505068535c748b..28a787d6e3f6fe 100644 --- a/src/platform/logging/BUILD.gn +++ b/src/platform/logging/BUILD.gn @@ -19,6 +19,7 @@ if (current_os == "android") { "${chip_root}/src/lib/support:attributes", "${chip_root}/src/lib/support:logging_constants", "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform/logging:headers", ] libs = [ "log" ] @@ -43,6 +44,7 @@ static_library("stdio") { "${chip_root}/src/lib/support:attributes", "${chip_root}/src/lib/support:logging_constants", "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform/logging:headers", ] # Ensure we end up with the expected output file name diff --git a/src/platform/mbed/BUILD.gn b/src/platform/mbed/BUILD.gn index e8029944beef69..6132390166ea01 100644 --- a/src/platform/mbed/BUILD.gn +++ b/src/platform/mbed/BUILD.gn @@ -40,6 +40,7 @@ static_library("mbed") { ] public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] if (chip_enable_wifi) { sources += [ diff --git a/src/platform/mt793x/BUILD.gn b/src/platform/mt793x/BUILD.gn index 1d7ce0f68f79e4..60ff46c35dc110 100644 --- a/src/platform/mt793x/BUILD.gn +++ b/src/platform/mt793x/BUILD.gn @@ -65,8 +65,7 @@ static_library("mt793x") { public_deps += [ "${chip_root}/third_party/mt793x_sdk/mDNSResponder" ] - deps = [] - public_deps += [] + deps = [ "${chip_root}/src/platform/logging:headers" ] # mDNS if (chip_mdns == "platform") { diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 65167ac4c8b5f5..f6807b3f8dd4e0 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -61,6 +61,7 @@ static_library("nrfconnect") { ] public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] if (chip_enable_factory_data) { sources += [ @@ -89,7 +90,7 @@ static_library("nrfconnect") { "../OpenThread/OpenThreadDnssdImpl.cpp", "../OpenThread/OpenThreadDnssdImpl.h", ] - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } } diff --git a/src/platform/nxp/k32w/k32w0/BUILD.gn b/src/platform/nxp/k32w/k32w0/BUILD.gn index 7c9d11aaa4433b..193ba06d78a271 100644 --- a/src/platform/nxp/k32w/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w/k32w0/BUILD.gn @@ -104,7 +104,7 @@ static_library("k32w0") { } } - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] diff --git a/src/platform/nxp/k32w/k32w1/BUILD.gn b/src/platform/nxp/k32w/k32w1/BUILD.gn index effb6cb2fc9d1e..5b42263b8380a0 100644 --- a/src/platform/nxp/k32w/k32w1/BUILD.gn +++ b/src/platform/nxp/k32w/k32w1/BUILD.gn @@ -86,7 +86,7 @@ static_library("k32w1") { public_deps += [ "${mbedtls_root}:mbedtls" ] } - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] if (chip_enable_openthread) { sources += [ diff --git a/src/platform/nxp/mw320/BUILD.gn b/src/platform/nxp/mw320/BUILD.gn index dda195b94979ef..cbae110382f1b0 100644 --- a/src/platform/nxp/mw320/BUILD.gn +++ b/src/platform/nxp/mw320/BUILD.gn @@ -74,7 +74,7 @@ static_library("mw320") { # Use ethernet/wifi interface for network commissioning. Default: WiFi defines += [ "USE_ETHERNET_COMMISSION=0" ] - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] diff --git a/src/platform/openiotsdk/BUILD.gn b/src/platform/openiotsdk/BUILD.gn index 3826e1d7eae37d..ec530f728eda0d 100644 --- a/src/platform/openiotsdk/BUILD.gn +++ b/src/platform/openiotsdk/BUILD.gn @@ -76,6 +76,8 @@ static_library("openiotsdk") { "${chip_root}/src/platform:platform_base", ] + deps = [ "${chip_root}/src/platform/logging:headers" ] + if (chip_enable_ota_requestor) { sources += [ "OTAImageProcessorImpl.cpp", diff --git a/src/platform/qpg/BUILD.gn b/src/platform/qpg/BUILD.gn index ad96b2aa3d42e1..9122243c005874 100644 --- a/src/platform/qpg/BUILD.gn +++ b/src/platform/qpg/BUILD.gn @@ -50,7 +50,7 @@ static_library("qpg") { "qpgConfig.h", ] - deps = [] + deps = [ "${chip_root}/src/platform/logging:headers" ] public = [ "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h" ] diff --git a/src/platform/silabs/SiWx917/BUILD.gn b/src/platform/silabs/SiWx917/BUILD.gn index 8aea32914594db..039794e680e852 100644 --- a/src/platform/silabs/SiWx917/BUILD.gn +++ b/src/platform/silabs/SiWx917/BUILD.gn @@ -75,6 +75,7 @@ static_library("SiWx917") { } public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] # Add platform crypto implementation if (chip_crypto == "platform") { diff --git a/src/platform/silabs/efr32/BUILD.gn b/src/platform/silabs/efr32/BUILD.gn index 262621e40f86ac..36d3a05787c16f 100644 --- a/src/platform/silabs/efr32/BUILD.gn +++ b/src/platform/silabs/efr32/BUILD.gn @@ -85,6 +85,7 @@ static_library("efr32") { } public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] # Add platform crypto implementation if (chip_crypto == "platform") { @@ -105,7 +106,7 @@ static_library("efr32") { if (chip_enable_openthread) { public_deps += [ "${chip_root}/third_party/openthread:openthread" ] - deps = [ "${chip_root}/third_party/openthread:openthread_cli" ] + deps += [ "${chip_root}/third_party/openthread:openthread_cli" ] sources += [ "${silabs_platform_dir}/ThreadStackManagerImpl.h", diff --git a/src/platform/stm32/BUILD.gn b/src/platform/stm32/BUILD.gn index 38290a49e2301d..bc823db59aedf1 100644 --- a/src/platform/stm32/BUILD.gn +++ b/src/platform/stm32/BUILD.gn @@ -32,6 +32,8 @@ if (chip_enable_openthread) { } static_library("stm32") { + deps = [ "${chip_root}/src/setup_payload" ] + if (stm32_board == "STM32WB5MM-DK") { sources = [ "../FreeRTOS/SystemTimeSupport.cpp", @@ -61,9 +63,10 @@ static_library("stm32") { "STM32FreeRtosHooks.h", "SystemPlatformConfig.h", ] + + deps += [ "${chip_root}/src/platform/logging:headers" ] } - deps = [ "${chip_root}/src/setup_payload" ] public = [ "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h" ] public_deps = [ "${chip_root}/src/crypto", diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index 9864ae4b5dfd09..58429c17f57f8e 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -56,6 +56,7 @@ static_library("telink") { ] public_deps = [ "${chip_root}/src/platform:platform_base" ] + deps = [ "${chip_root}/src/platform/logging:headers" ] defines = [ "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" ] @@ -81,7 +82,7 @@ static_library("telink") { "../OpenThread/OpenThreadDnssdImpl.cpp", "../OpenThread/OpenThreadDnssdImpl.h", ] - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } } diff --git a/src/platform/webos/BUILD.gn b/src/platform/webos/BUILD.gn index 719f3c70254b2c..b2510a3040df95 100644 --- a/src/platform/webos/BUILD.gn +++ b/src/platform/webos/BUILD.gn @@ -100,7 +100,10 @@ static_library("webos") { "SystemTimeSupport.cpp", ] - deps = [ "${chip_root}/src/setup_payload" ] + deps = [ + "${chip_root}/src/platform/logging:headers", + "${chip_root}/src/setup_payload", + ] public_deps = [ "${chip_root}/src/app/common:cluster-objects",