After checking out the WebKit source tree, achieving the equivalent of build-webkit, run-safari, and debug-safari from within the Xcode IDE requires multiple setup steps. An Xcode workspace with a few schemes can eliminate almost all of this work.
Created attachment 140425 [details] Add a WebKit Xcode workspace with schemes for building all source and tools and targeting WebProcess, Safari and DumpRenderTree
The EWS bots failed to apply this patch using svn-apply and a git checkout of the WebKit repo. I was able to apply this patch with svn-apply and a SVN checkout of the WebKit repo. Filed bug #85742 to investigate the svn-apply issue.
Comment on attachment 140425 [details] Add a WebKit Xcode workspace with schemes for building all source and tools and targeting WebProcess, Safari and DumpRenderTree Lets try this out!
Comment on attachment 140425 [details] Add a WebKit Xcode workspace with schemes for building all source and tools and targeting WebProcess, Safari and DumpRenderTree View in context: https://bugs.webkit.org/attachment.cgi?id=140425&action=review Fantastic! Thank you! > Tools/Scripts/build-webkit:248 > + (system("perl Tools/Scripts/copy-webkitlibraries-to-product-directory") == 0) or die; This is fantastic to break this out into a separate script! (build-webkit needs to keep getting smaller)
Fixed in <http://trac.webkit.org/r116257>.
Perhaps I'm doing it wrong, but hitting "build" inside the Workspace gets me this error: make: *** No rule to make target `/Projects/WebKit/Tools/DumpRenderTree/build/Debug/DumpRenderTree', needed by `/Projects/WebKit/Tools/DumpRenderTree/build/Debug/DerivedSources/DumpRenderTree/DumpRenderTreeSupport_wrap.c'. Stop. Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2
It also seems to be failing to build WTF (since JavaScriptCore can't find wtf/Platform.h). :( I guess either I'm doing something wrong, or some part of the config didn't quite make it into the repo?
Which scheme did you try to build with? The All Tools scheme currently depends on one of the All Source schemes to have been built.
(In reply to comment #8) > Which scheme did you try to build with? The All Tools scheme currently depends on one of the All Source schemes to have been built. I actually selected the All Sources scheme and run build. It compiled WTF correctly, LLInt Offsets but JSCLLIntOffsetsExtractor target failed to compile (then the build stop) as LLIntOffsetsExtractor.cpp include <wtf/Platform.h> which is not found :(. But really it is a very welcomed patch and makes life easier for people who work occasionally on the Mac port. Some other questions : - How to specify the output dir like build-webkit? I have a single git checkout but shadow build all the ports. Is is possible? Can I do it for the entire workspace? - What is the All Source (target WebProcess). What is the use case? - If I want to run/debug with Safari, positioning the All Source scheme and then click debug is enough I believe? Thanks anyway.
(In reply to comment #9) > (In reply to comment #8) > > Which scheme did you try to build with? The All Tools scheme currently depends on one of the All Source schemes to have been built. > > I actually selected the All Sources scheme and run build. It compiled WTF correctly, LLInt Offsets but JSCLLIntOffsetsExtractor target failed to compile (then the build stop) as LLIntOffsetsExtractor.cpp include <wtf/Platform.h> which is not found :(. It seems that the "copy headers" build phase of WTF is not executed or maybe I'm wrong. > > But really it is a very welcomed patch and makes life easier for people who work occasionally on the Mac port. > > Some other questions : > > - How to specify the output dir like build-webkit? I have a single git checkout but shadow build all the ports. Is is possible? Can I do it for the entire workspace? > > - What is the All Source (target WebProcess). What is the use case? > > - If I want to run/debug with Safari, positioning the All Source scheme and then click debug is enough I believe? > > Thanks anyway.
(In reply to comment #9) > (In reply to comment #8) > > Which scheme did you try to build with? The All Tools scheme currently depends on one of the All Source schemes to have been built. > > I actually selected the All Sources scheme and run build. It compiled WTF correctly, LLInt Offsets but JSCLLIntOffsetsExtractor target failed to compile (then the build stop) as LLIntOffsetsExtractor.cpp include <wtf/Platform.h> which is not found :(. Can you file a new bug about this? > > But really it is a very welcomed patch and makes life easier for people who work occasionally on the Mac port. > > Some other questions : > > - How to specify the output dir like build-webkit? I have a single git checkout but shadow build all the ports. Is is possible? Can I do it for the entire workspace? This is answered in <http://www.webkit.org/building/debug.html>: “Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit by choosing File > Workspace Settings and clicking the Advanced button, selecting Custom, Relative to Workspace, and entering WebKitBuild both for Products and for Intermediates.” > - What is the All Source (target WebProcess). What is the use case? That scheme builds the same targets, but runs WebProcess in a configuration that makes it launch Safari as its client. This makes it easier to debug WebProcess, which is useful for people working on WebCore and JavaScriptCore. It is equivalent to “debug-safari --target-web-process”. > > - If I want to run/debug with Safari, positioning the All Source scheme and then click debug is enough I believe? Yes, but if you are interested in debugging WebCore or JavaScriptCore, you probably want to debug WebProcess, using the aforementioned scheme. Either way, Xcode allows you to attach to the other process and debug both simultaneously.
(In reply to comment #11) > (In reply to comment #9) > > (In reply to comment #8) > > > Which scheme did you try to build with? The All Tools scheme currently depends on one of the All Source schemes to have been built. > > > > I actually selected the All Sources scheme and run build. It compiled WTF correctly, LLInt Offsets but JSCLLIntOffsetsExtractor target failed to compile (then the build stop) as LLIntOffsetsExtractor.cpp include <wtf/Platform.h> which is not found :(. > > Can you file a new bug about this? Sure here it is : https://bugs.webkit.org/show_bug.cgi?id=86430 > > > > > But really it is a very welcomed patch and makes life easier for people who work occasionally on the Mac port. > > > > Some other questions : > > > > - How to specify the output dir like build-webkit? I have a single git checkout but shadow build all the ports. Is is possible? Can I do it for the entire workspace? > > This is answered in <http://www.webkit.org/building/debug.html>: > “Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit by choosing File > Workspace Settings and clicking the Advanced button, selecting Custom, Relative to Workspace, and entering WebKitBuild both for Products and for Intermediates.” Sorry about that :(. > > > > - What is the All Source (target WebProcess). What is the use case? > > That scheme builds the same targets, but runs WebProcess in a configuration that makes it launch Safari as its client. This makes it easier to debug WebProcess, which is useful for people working on WebCore and JavaScriptCore. It is equivalent to “debug-safari --target-web-process”. > > > > > - If I want to run/debug with Safari, positioning the All Source scheme and then click debug is enough I believe? > > Yes, but if you are interested in debugging WebCore or JavaScriptCore, you probably want to debug WebProcess, using the aforementioned scheme. Either way, Xcode allows you to attach to the other process and debug both simultaneously. Ok thanks for the explanation.