Bug 31522

Summary: [Chromium] Allow building without SVG
Product: WebKit Reporter: Evan Martin <evan>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jorlow, laszlo.gombos, mark
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
wip patch
none
patch
none
patch jorlow: review+

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]
patch
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]
patch
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).
http://codereview.chromium.org/655001
Comment 9 Jeremy Orlow 2010-02-23 07:12:44 PST
Comment on attachment 49292 [details]
patch

r=me

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

[       '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).