-
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
[chip-tool][darwin-framework-tool] Add libs to the declare_args secti… #36762
base: master
Are you sure you want to change the base?
[chip-tool][darwin-framework-tool] Add libs to the declare_args secti… #36762
Conversation
PR #36762: Size comparison from af8d173 to 2148272 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@@ -25,6 +25,10 @@ if (config_use_interactive_mode) { | |||
|
|||
assert(chip_build_tools) | |||
|
|||
declare_args() { | |||
libs = [] |
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.
libs seems quite a generic argument name. Can we be more specific?
Please add comments explaining purpose and usage.
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.
Why does chip-tool need this? I see darwin-framework-tool uses it only.
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.
libs seems quite a generic argument name. Can we be more specific?
This is a built-in gn variable. See https://gn.googlesource.com/gn/+/main/docs/reference.md#var_libs
The idea is to be able to pass, on command line, additional libraries to link, it looks like. So you won't see "uses" in chip-tool, just "uses" when someone builds chip-tool.
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.
By "uses" I mean to justify use cases in comments. This PR asks to add something that we need to then maintain and because nobody uses it, we won't have CI for this. Maybe we should have some CI (e.g. some malloc library for testing? I have no idea)...
I am pushing back on adding something that is very broad (can add any library here) that has no tests and no description of practical use. I am sure it has a practical use in mind, but nothing documented and nothing in CI/tested is concerning.
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 needs more explanation (in commments near the argument) of what "testing with custom libraries" actually means.
I am unsure we want this build system flexibility: if we need custom builds, people should create custom builds. Allowing a hook of "inject anything" seems super broad and requires explanations/documentation.
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.
The SWTT standup has a Testing
section requirement now. That seems to potentially serve well here as it forces an explanation on "how was this tested" and that implies we may get some examples on how these libs arguments were used (and why this affects both chip-tool and darwin-framework-tool)
…on of BUILD.gn
Problem
This PR introduces the
libs
argument to thedeclare_args
sections of bothchip-tool/BUILD.gn
anddarwin-framework-tool/BUILD.gn
.Adding the libs argument facilitates testing against custom libraries.