Building WebKit
Building WebKit requires that you have the proper developer tools installedand that you have a copy of the WebKit source tree. Run the build-webkit
script to build WebKit. Use the --debug
option for a debug build, which includes debugging symbols and assertions:
build-webkit --debug
By default, build-webkit
places build products in WebKitBuild
. You can specify a different build location on Mac in your Xcode preferences. On other platforms, the WEBKIT_OUTPUTDIR
environment variable can be used to set a different build products location. If you have set up a custom build location, then build-webkit
will place the build products there. Once your build has finished, you can run Safari using your custom WebKit build. Don’t forget that if you have any questions or problems building WebKit, feel free to get in touch!
Windows
Building on Windows requires a few more steps. For details, see http://trac.webkit.org/wiki/BuildingOnWindows.
iOS Simulator
The first time after you install a new Xcode, you will need to run sudo Tools/Scripts/configure-xcode-for-ios-development
in the Terminal to enable Xcode to build command line tools for iOS Simulator. Otherwise you will see the error message: target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform. when building target JSCLLIntOffsetsExtractor of project JavaScriptCore. Then follow the instructions below, passing the --ios-simulator
option, to build WebKit for your first build and all subsequent builds.
Setting a Default Configuration
To set a default build configuration for build-webkit
and other scripts, use the set-webkit-configuration
script:
set-webkit-configuration --debug
set-webkit-configuration --release
Building WebKit from Xcode
To build from within Xcode, you can use the WebKit workspace. Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit
: choose File > Workspace Settings, then click the Advanced button, select Custom, Relative to Workspace, and enter WebKitBuild
for both Products and Intermediates. Note that if you have specified a custom build location in Xcode preferences, then you don’t need to do this.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步