Comes out of discussion arising on https://bugs.chromium.org/p/chromium/issues/detail?id=850869, which is more-or-less orthogonal to the actual bug being worked on there.
rockot@: "If you want to try merging //services/network/public/mojom::websocket and //services/network/public/mojom back together, make
//services/network/public/mojom:mojom a mojom_component() target. This is
of course incompatible with the use of export_*_blink settings that I see
there today. I'm not sure why that stuff is there, but it will probably be unnecessary anyway if the mojom builds as its own component."
yhirano@: "I spent some time but I couldn't do that due to undefined references for KURL functions. Probably I failed to define dependency correctly."
rockot: "I see. The problem is url mojom. It's also not a component target, which means all of its dependents generating blink bindings will end up with an implicit dependency on KURL. The only way to resolve that dependency is to be linked into blink directly as part of its own component target.
The proper fix would be:
1. split KURL out into its a new leaf component target within blink
2. make //url/mojo:url_mojom_gurl a mojom_component target
3. make its blink traits depend explicitly on the KURL target
#1 seems hard since there are quite a few other blink "platform" deps in KURL.
We could change the way interface tagging works for lazy serialization, using a large random build-time value rather than a static symbol address as a tag. This is really only papering over actual ODR violations though.
In any case, it seems we should do something eventually. The whole "export_*_blink" junk just means we have random bits of Blink code scattered across the tree, and it's obviously very confusing and time consuming for everyone when things randomly go wrong."
+1 to the latter sentiment.
Comment 1 by roc...@chromium.org
, Oct 17