Bug 29157

Summary: [Qt] Add the ability to specify the mkspec when building with qmake
Product: WebKit Reporter: Benjamin Meyer <ben>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Enhancement CC: eric, vestbo
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
patch for webkitdirs.pm vestbo: review-

Description Benjamin Meyer 2009-09-10 15:26:38 PDT
Created attachment 39387 [details]
patch for webkitdirs.pm

It would be nice to specify the qt mkspec to build with.  For example on mac you can compile with gcc, gcc-llvm or clang as they are all compatible.
Comment 1 Adam Barth 2009-09-23 23:00:32 PDT
I really wanted to review this patch, but it made my brain explode.
Comment 2 Eric Seidel (no email) 2009-09-24 13:06:47 PDT
Comment on attachment 39387 [details]
patch for webkitdirs.pm

If you want a non-qt person to review this you'll need to explain better in your ChangeLog what this does and why it's a good thing.
Comment 3 Benjamin Meyer 2009-09-24 19:26:01 PDT
By default the qmake build system of webkit uses the compiler spec that qt was built with.  On OS X for example I built qt for gcc and so the default mkspec is gcc.  If I want to test out building QtWebKit with gcc-llvm you currently have to make a special build or qt.  This patch ads support so you can specify the mkspec on the build-webkit script.
Comment 4 Simon Hausmann 2009-09-27 14:19:48 PDT
Comment on attachment 39387 [details]
patch for webkitdirs.pm

My perl is rusty. Tor Arne, I heard your perl skillz are pretty l33t these days ;-). Could you take a look at this one?
Comment 5 Tor Arne Vestbø 2009-10-05 03:06:05 PDT
Comment on attachment 39387 [details]
patch for webkitdirs.pm

Hmm, you should be able to set the spec already using --qmakearg="-spec macx-llvm", or using the QMAKESPEC environment variable.

The only thing your patch does as far as I can tell is it makes sure we read the correct spec when determining whether to use nmake or make to build.
If you want to support that I'd init the spec to $ENV{"QMAKESPEC"} || "default" in buildQMakeProject() and then pull out the spec on line 1290 if the arg is -spec, and then
pass that on to qtMakeCommand(). Also, you can do my ($qmakebin, $spec) = @_;
Comment 6 Tor Arne Vestbø 2009-10-05 03:49:39 PDT
r49088 fixed an issue with the --qmakearg="-spec
macx-llvm" syntax.