Fix circular dependency issue when linking message layer (#2398)
* Fix circular dependency issue when linking message layer
PlatformLayer is responsible for initilizing the CHIP stack, it should depend on the libcore which is the dependent of most of CHIP Core stack components. We should remove platform from libcore as the dependent to make message layer link.
* Fix the nRF5 build
* Narrow OpenThread dep to only public config header
Co-authored-by: Michael Spang <spang@google.com>
diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn
index 41619b6..cffe4f9 100644
--- a/src/platform/BUILD.gn
+++ b/src/platform/BUILD.gn
@@ -162,6 +162,7 @@
":platform_buildconfig",
"${chip_root}/src/ble",
"${chip_root}/src/inet",
+ "${chip_root}/src/lib/core",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support",
"${nlio_root}:nlio",