We compile the foo_blink bindings target even if no one uses it? |
||
Issue description
In GN, we auto-magically creates a foo_blink target when defining:
mojom("foo") {
...
}
I realized that we build foo_blink even if no one uses it. That seems an unnecessary cost, given that a lot of mojo interfaces are not used to communicate with blink.
Sam: Would you please help looking into it? Thanks!
,
Jan 9 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by yzshen@chromium.org
, May 17 2016I took a look at this and found that even if foo_blink is not depended on by anyone it still gets compiled when building "all". One possible solution is to do something like: mojom("foo") { generate_blink = "foo_blink" // optional; not generated when not specified ... } Pros: - More explicit for readers. They can grep "foo_blink" to find out where it comes from. - Less compile time when building "all". (Dirk thinks the cost of compiling them is probably very small, especially since it only happens when building "all".) Cons: - Extra work for the writer, considering we have more targets that we may want to expose, e.g., foo_js. Chatted with John and Dirk, the conclusion is that this may not be super important unless it is proved to have a big impact on build performance. Sam: Please feel free to unassign. I added you as owner thinking it might be an issue in mojom.gni or somewhere. Thanks!