-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Define per-cluster server and client targets in GN #36917
base: master
Are you sure you want to change the base?
[WIP] Define per-cluster server and client targets in GN #36917
Conversation
Have chip_data_model targets depend on these, instead of making up a source set on the fly.
PR #36917: Size comparison from c1afc02 to 5728f01 Full report (3 builds for cc32xx, stm32)
|
":time-sync-data-provider-test-srcs", | ||
"${chip_root}/src/app", | ||
"${chip_root}/src/app:attribute-persistence", | ||
"${chip_root}/src/app/clusters/thread-network-directory:server", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should name the targets for cluster foo as foo
so that the server suffix is not necessary (i.e. typical/default should have the same name as the directory, extra bits should be differently named if necessary)
@@ -75,3 +75,11 @@ source_set("callbacks") { | |||
"${chip_root}/src/app:paths", | |||
] | |||
} | |||
|
|||
source_set("binding-table-headers") { | |||
sources = [ "binding-table.h" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not split cpp from header. Even this is what happens in practice, this allows for circular/odd dependencies. We should add source sets only when we are able to fix things.
* This function returns true if | ||
* the endpoint contains client of a given cluster. | ||
*/ | ||
bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this splits the logic of "if xyz is defined in foo.h, it is implemented in foo.cpp". As a result then we have a "ember-api.h" that is available standalone even though the functions that it defines are not linked in and this breaks dependencies.
|
||
import("//build_overrides/chip.gni") | ||
|
||
source_set("server") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source_set("server") { | |
source_set("thread-network-directory") { |
|
||
import("//build_overrides/chip.gni") | ||
|
||
source_set("server") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source_set("server") { | |
source_set("wifi-network-management") { |
} | ||
|
||
source_set("ember-api-headers") { | ||
sources = [ "ember-api.h" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not have a header without the implementation cpp unless that header defines constants only. I.e. if I depend on foo
I should be able to link. This breaks that.
Have chip_data_model targets depend on these, instead of making up a source set on the fly.
Early preview of this idea.