project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.32k stars 1.96k forks source link

In fact, there is no such file of `src/platform/OpenThread/BUILD.gn`. Maybe we can add the source set later but not in this PR. #34594

Open dhrishi opened 1 month ago

dhrishi commented 1 month ago
          In fact, there is no such file of `src/platform/OpenThread/BUILD.gn`. Maybe we can add the source set later but not in this PR.

_Originally posted by @wqx6 in https://github.com/project-chip/connectedhomeip/pull/33872#discussion_r1675381200_

dhrishi commented 1 month ago

@wqx6 PTAL

wqx6 commented 1 month ago

I cannot add a source_set for OpenThreadBorderRouter delegate in src/platform/OpenThread/BUILD.gn. The sources use the headers such as platform/ThreadStackManager.h which are in the static_library ${chip_root}/src/platform:platform. If we make the thread_br source_set depend on the static_library ${chip_root}/src/platform:platform. There will be a dependency cycle error. I guess that is the reason why we didn't create BUILD.gn file in src/platform/OpenThread before.

ERROR Dependency cycle:
  //third_party/connectedhomeip/src/platform:platform ->
  //third_party/connectedhomeip/src/platform/ESP32:ESP32 ->
  //third_party/connectedhomeip/src/platform/OpenThread:border-router-delegate ->
  //third_party/connectedhomeip/src/platform:platform