Bug 76381 - Use precompiled headers in Chromium port on Windows
Summary: Use precompiled headers in Chromium port on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 07:01 PST by Jói Sigurðsson
Modified: 2012-01-19 11:00 PST (History)
4 users (show)

See Also:


Attachments
Patch (17.35 KB, patch)
2012-01-16 08:50 PST, Jói Sigurðsson
no flags Details | Formatted Diff | Diff
Patch (15.78 KB, patch)
2012-01-18 03:44 PST, Jói Sigurðsson
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jói Sigurðsson 2012-01-16 07:01:48 PST
There is a trick in GYP that can be used to enable precompiled headers for Windows builds without touching any of the source files.  This speeds up a build of the WebKit Chromium port by about 18% on a fast machine (8 cores, 12 GB memory).
Comment 1 Jói Sigurðsson 2012-01-16 08:50:32 PST
Created attachment 122645 [details]
Patch
Comment 2 Tony Chang 2012-01-17 11:09:38 PST
Comment on attachment 122645 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122645&action=review

Seems fine, just some minor nits.

I'm not sold on the directory Source/gyp/* for these files because chromium currently doesn't use either file in Source/gyp, but maybe that's OK.  Maybe abarth has a better suggestion.

> Source/gyp/WinPrecompile.cpp:35
> + */

The svn:executable bit appears to be set on all these files.

> Source/gyp/WinPrecompile.gypi:37
> +  'conditions': [
> +    ['OS=="win" and chromium_win_pch==1', {
> +        'variables': {
> +            'conditions': [

Nit: This is a mix of 2 space and 4 space indents.  I would use 4 space indents since that's more consistent with the rest of WebKit.

> Source/gyp/WinPrecompile.gypi:41
> +                # We need to calculate the path to the gyp directory
> +                # differently depending on whether we are being built
> +                # stand-alone (via build-webkit --chromium) or as part
> +                # of the Chromium checkout.

80 column line limit doesn't exist in webKit so feel free to unwrap this comment into 2 lines or so.
Comment 3 Tony Chang 2012-01-17 13:33:07 PST
(In reply to comment #2)
> 
> I'm not sold on the directory Source/gyp/* for these files because chromium currently doesn't use either file in Source/gyp, but maybe that's OK.  Maybe abarth has a better suggestion.

On IRC abarth suggested putting the new files in Source/JavaScriptCore/wtf/win/*.
Comment 4 Jói Sigurðsson 2012-01-18 03:44:54 PST
Created attachment 122901 [details]
Patch
Comment 5 WebKit Review Bot 2012-01-18 03:46:12 PST
Attachment 122901 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/WebKit/chromium/WinPrecompile.h:60:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Jói Sigurðsson 2012-01-18 03:48:12 PST
I've uploaded a new patch, which:
- Removes the svn:executable bit that was accidentally added;
- Fixes the mixed 2/4 space indentation (uses 4-space as suggested);
- Unwraps the comment as suggested;
- Moves the new files to Source/WebKit/chromium.

That last bit is counter to abarth's suggestion (which was Source/JavaScriptCore/wtf/win).  I thought about it a bit and it seems weird to move the files to a top-level directory that they're not specific to (JavaScriptCore).  OTOH, these files are specific to the Chromium port, so it could make sense to keep them there.

Let me know what you think, I'm happy to move them back to the location suggested by abarth, or to a new location.
Comment 7 Tony Chang 2012-01-18 13:23:03 PST
Comment on attachment 122901 [details]
Patch

Putting the files in Source/WebKit/chromium seems fine to me. We can always move them later.
Comment 8 Tony Chang 2012-01-18 14:18:08 PST
Joi, do you want me to land this patch?
Comment 9 Jói Sigurðsson 2012-01-19 02:01:11 PST
Tony, that would be great, and thanks for the review.
Comment 10 Tony Chang 2012-01-19 11:00:45 PST
Committed r105428: <http://trac.webkit.org/changeset/105428>