Re: [webkit-dev] ccache on mac

2017-05-08 Thread Ben Kelly
On Mon, May 8, 2017 at 10:25 AM, Alex Christensen 
wrote:

> It would be nice if we could just get the CMake built WebKit working with
> run-safari and run-webkit-tests.  That’s something I’ve been meaning to do
> for a while but haven’t gotten around to it.  Something is wrong with the
> xpc service locations and plists, but I think everything else should be ok
> since run-minibrowser works fine with WebKit1.  Let me know if you want to
> help out with this approach and I’ll give you more details
>

Ah, ok.  It wasn't obvious to me what was fully or partially supported.
Unfortunately I don't think I'll have time to work on the build system.  I
want to try to focus on web facing stuff if I can.

For the time being I worked around the issue with a few scripts using the
xcode build:

A clang wrapper like this:

#!/bin/bash
export CCACHE_CPP2=true
_xcode_path=`/usr/bin/xcode-select -p`
_xcode_clang="${_xcode_path}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
exec /usr/local/bin/ccache "$_xcode_clang" "$@"

And then a build-webkit wrapper to pass them on the command line:

#!/bin/bash
build-webkit CC="/srv/bin/ccache-clang" CXX="/srv/bin/ccache-clang++" "$@"

Seems to be working.  I didn't realize before I could just pass CC/CXX on
the command line like this.

I guess I'll have to make this smarter or have separate scripts if I want
to build for ios or the simulator.

Anyway, just thought I would post that in case anyone else ran into the
same problem.

Thanks.

Ben
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] ccache on mac

2017-05-08 Thread Ben Kelly
On Mon, May 8, 2017 at 12:32 AM, youenn fablet  wrote:

> I had this setup working a year or so ago. I was using the regular Mac
> "make" build.
>
> Le dim. 7 mai 2017 à 19:28, Ben Kelly  a écrit :
>
>> Hi all,
>>
>> Does anyone have ccache (or an equivalent) working with local webkit
>> builds on mac?  I've spent the last couple of days trying to figure out,
>> but have not had much luck.
>>
>> I've installed ccache via homebrew and its in my path.
>>
>
> Did the same. I had to ensure clang used by Xcode was the ccache proxy.
> Don't remember whether just setting CC/CXX in the command line works.
> When running make, you can see which clang is used.
> Maybe setting CC/CXX in Source/WebCore/Configurations/Base.xcconfig would
> do the trick (for WebCore).
>

I guess I'm hesitant to fiddle with Base.xcconfig because I don't want to
accidentally include those changes in patches, etc.

What is the syntax for overriding CC/CXX on the command line with
build-webkit?  (Or for the make build, although its unclear how to
configure that.)

I guess I was also hoping there was some way to specify a
'user-override.xcconfig' that the webkit build would try to pull-in
automatically where this stuff could be set.

Thanks.

Ben
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] ccache on mac

2017-05-07 Thread youenn fablet
I had this setup working a year or so ago. I was using the regular Mac
"make" build.

Le dim. 7 mai 2017 à 19:28, Ben Kelly  a écrit :

> Hi all,
>
> Does anyone have ccache (or an equivalent) working with local webkit
> builds on mac?  I've spent the last couple of days trying to figure out,
> but have not had much luck.
>
> I've installed ccache via homebrew and its in my path.
>

Did the same. I had to ensure clang used by Xcode was the ccache proxy.
Don't remember whether just setting CC/CXX in the command line works.
When running make, you can see which clang is used.
Maybe setting CC/CXX in Source/WebCore/Configurations/Base.xcconfig would
do the trick (for WebCore).


> I *do* see ccache being used if I do a `webkit-build --cmake`, but I can't
> use run-safari or run-webkit-tests with a cmake build.  I get an error like:
>
>   Can't find built framework at
> "/srv/WebKit/WebKitBuild/dev/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore".
>

I think the CMake build is not complete in terms of executable. It would be
great if we could finalize it.
Alex knows a lot about this.


> If I do a non-cmake build I can successfully use run-safari and
> run-webkit-tests, but it appears ccache is not used.  It looks like its
> going through the xcode CLI tools.  I've searched for how to configure
> xcode to use ccache, but everything suggests I need to hand modify the
> project xcconfig.
>
> Can anyone recommend a good way to get local builds that work with
> run-safari/run-webkit-tests and that use ccache?
>
> (FWIW, the main reason I want ccache is that touching any idl file appears
> to trigger a rebuild of most of WebCore.)
>

Right, this is a known limitation of the current build system and something
that would be good to improve on.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev