Setting build args to false will not always disable certain feature

Skip to first unread message

Muralitharan Perumal

Jun 18, 2024, 1:28:20 PMJun 18
to Chromium-dev

I have been trying to reduce the chrome binary image size by disabling certain features using build args as the first step. The current stripped chrome size is 167MB (ARM), but aiming to bring it down under 100 MB and not sure if that is possible.

When I do this 'enable_media_remoting = false', I expect it to work but it fails for undefined symbol:

ld.lld: error: undefined symbol: CastRemotingConnector::Get(content::WebContents*)
>>> referenced by

when checking the source, it's not under any compilation flag.

void MediaRouterDesktop::CreateRoute(const MediaSource::Id& source_id,
                                     const MediaSink::Id& sink_id,
                                     const url::Origin& origin,
                                     content::WebContents* web_contents,
                                     MediaRouteResponseCallback callback,
                                     base::TimeDelta timeout) {
  const MediaSource source(source_id);
  if (source.IsTabMirroringSource()) {
    // Ensure the CastRemotingConnector is created before mirroring starts.
    CastRemotingConnector* const connector =



If this is required by default, why do we need to have a build arg to enable/disable this feature?

Any thoughts?


Jeremy Roman

Jun 18, 2024, 2:00:37 PMJun 18
to, Chromium-dev
Not all combinations of build flags are supported, unfortunately.

I don't work on the relevant code, but it's likely that it's used to disable code that is not used on platforms where media remoting isn't supported (which appears to be iOS and Cast devices). On the other hand, if there is no desktop platform where Chromium ships without media remoting support, it's possible that desktop-only code doesn't examine the build flag.

You'd have to ask the relevant OWNERS whether they would accept patches to guard the desktop code in some way, but it might be involved and it might not continue to work if the CI does not test such a configuration. In general, code in chrome/ is built with the intent of supporting the Chrome product, so flexibility that doesn't benefit Chrome often isn't a priority.

Chromium Developers mailing list:
View archives, change email options, or unsubscribe:
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages