WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
96245
[Qt] Fix generation of forward headers for generated files in WebCore on Windows
https://bugs.webkit.org/show_bug.cgi?id=96245
Summary
[Qt] Fix generation of forward headers for generated files in WebCore on Windows
Simon Hausmann
Reported
2012-09-10 01:29:08 PDT
[Qt] Fix generation of forward headers for generated files in WebCore on Windows
Attachments
Patch
(2.09 KB, patch)
2012-09-10 01:32 PDT
,
Simon Hausmann
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Hausmann
Comment 1
2012-09-10 01:32:59 PDT
Created
attachment 163063
[details]
Patch
Tor Arne Vestbø
Comment 2
2012-09-10 02:58:06 PDT
Comment on
attachment 163063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163063&action=review
> Source/WebKit2/DerivedSources.pri:148 > + win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul))
It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt's makefiles, perhaps stick with that?
Simon Hausmann
Comment 3
2012-09-10 03:52:42 PDT
Comment on
attachment 163063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163063&action=review
>> Source/WebKit2/DerivedSources.pri:148 >> + win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul)) > > It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt's makefiles, perhaps stick with that?
The problem with that approach is that it doesn't work well with parallel rules that try to create the same directory ;( IOW there's a race condition between the check if the directory exists and making it. If you have two jobs trying to do the same thing, then both jobs determine simultaneously that the directory doesn't exist, both try to create the directory at the same time and only once succeeds. The second one will see mkdir aborting because the directory already exists. I tried removing the mkdir from this rule altogether and instead depend on the other generator that creates the directory also, but unfortunately when depending on such a symbol target nmake will always call it and thus always re-generate the file.
Tor Arne Vestbø
Comment 4
2012-09-10 04:34:19 PDT
Comment on
attachment 163063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=163063&action=review
>>> Source/WebKit2/DerivedSources.pri:148 >>> + win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul)) >> >> It looks like we use $${QMAKE_CHK_DIR_EXISTS} || $${QMAKE_MKDIR} in the rest of Qt's makefiles, perhaps stick with that? > > The problem with that approach is that it doesn't work well with parallel rules that try to create the same directory ;( > > IOW there's a race condition between the check if the directory exists and making it. If you have two jobs trying to do the same thing, then > both jobs determine simultaneously that the directory doesn't exist, both try to create the directory at the same time and only once succeeds. The > second one will see mkdir aborting because the directory already exists. > > I tried removing the mkdir from this rule altogether and instead depend on the other generator that creates the directory also, but unfortunately when > depending on such a symbol target nmake will always call it and thus always re-generate the file.
Ouch! You're right, that will not be pretty. Wonder why Qt gets away with that though.
WebKit Review Bot
Comment 5
2012-09-10 04:40:06 PDT
Comment on
attachment 163063
[details]
Patch Clearing flags on attachment: 163063 Committed
r128045
: <
http://trac.webkit.org/changeset/128045
>
WebKit Review Bot
Comment 6
2012-09-10 04:40:10 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug