Bug 31522 - [Chromium] Allow building without SVG
Summary: [Chromium] Allow building without SVG
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-11-15 17:09 PST by Evan Martin
Modified: 2010-02-23 08:16 PST (History)
3 users (show)

See Also:

wip patch (3.72 KB, patch)
2009-11-15 17:09 PST, Evan Martin
no flags Details | Formatted Diff | Diff
patch (7.10 KB, patch)
2010-02-23 06:56 PST, Evan Martin
no flags Details | Formatted Diff | Diff
patch (7.72 KB, patch)
2010-02-23 07:04 PST, Evan Martin
jorlow: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Martin 2009-11-15 17:09:25 PST
Created attachment 43257 [details]
wip patch

I don't use SVG in my day-to-day debugging and it's a bunch of extra code for
the compiler, linker, etc. to move around.

I measured it at around 14.5% of the resulting binary size of a Debug build.

We should allow building without SVG.
Comment 1 Laszlo Gombos 2010-02-22 20:50:21 PST
Evan, did you intended to put this patch up for review ? It seems to me that maybe you accidentally marked it for r-.
Comment 2 Evan Martin 2010-02-23 01:09:30 PST
No, the patch wasn't complete so I marked it so that it explicitly shouldn't be reviewed.
Comment 3 Evan Martin 2010-02-23 06:56:37 PST
Created attachment 49288 [details]
Comment 4 Evan Martin 2010-02-23 07:02:55 PST
Needs a changelog, arg.
Comment 5 Evan Martin 2010-02-23 07:04:43 PST
Created attachment 49292 [details]
Comment 6 Evan Martin 2010-02-23 07:06:06 PST
With this patch, my Chrome debug binary is 71mb smaller.  Most of the cut fat is in DerivedSources which is the slowest file to build, too.
Comment 7 Evan Martin 2010-02-23 07:11:18 PST
+mark for gyp comments
Comment 8 Evan Martin 2010-02-23 07:11:57 PST
Chrome-side bits (not needed to land this patch, just for reference).
Comment 9 Jeremy Orlow 2010-02-23 07:12:44 PST
Comment on attachment 49292 [details]


This is probably worth a chromium-dev post.  :-)
Comment 10 Evan Martin 2010-02-23 07:51:22 PST
Comment 11 Mark Mentovai 2010-02-23 08:11:47 PST
Comment on attachment 49292 [details]

[       'sources': [,]
>-        # idl rule
>+        # idl rules except for svg (added below)
>         '<@(webcore_bindings_idl_files)',
>       ],
>+      'conditions': [
>+        ['enable_svg!=0', {
>+          'sources': [
>+            '<@(webcore_bindings_idl_files)',
>+          ],
>+        }],
>+      ],

This says "add webcore_bindings_idl_files to sources, and if enable_svg, add them again."  I doubt that's what you meant.

GYP singleton processing will strip the extras so the above won't be harmful, but you should fix it.  This section should be OK the way it was prior to this patch.
Comment 12 Evan Martin 2010-02-23 08:16:32 PST
Wow, how does this even compile!?  It is supposed to reference a different variable (the svg-specific one).