| 27 | |
| 28 | Note that this requires either having binary drops of LLVM headers and static libraries, or having your own LLVM checkout. |
| 29 | |
| 30 | Also note that building directly from Xcode is not supported at this time. |
| 31 | |
| 32 | === Building from binary drops |
| 33 | |
| 34 | The WebKit repository includes LLVM binary drops for Mountain Lion in trunk/WebKitLibraries. If you're on Mountain Lion and you use the --ftl-jit option to build-jsc, run-javascriptcore-tests, or build-webkit, the build system will automatically pull LLVM from those binary drops. |
| 35 | |
| 36 | === Building from your own LLVM checkout |
| 37 | |
| 38 | The easiest way to build with your own LLVM checkout is to check out llvm into a directory called 'llvm' directly inside your checkout of WebKit. If you do this, build-jsc and friends will automatically configure and make this LLVM tree and pull the binaries into WebKit's build. LLVM's configure script is only run if we detect that you hadn't already run it. The default configuration parameters are kept in Tools/Scripts/configure-llvm. |
| 39 | |
| 40 | Note that this handles dependencies pretty well. For example, even if you don't change any LLVM headers, this will cause the JavaScriptCore framework to be correctly relinked. |
| 41 | |
| 42 | There are two alternatives that give you varying degrees of control over how WebKit builds LLVM. |
| 43 | |
| 44 | - You can put your LLVM checkout wherever you like and then make sure that the LLVM_SOURCE_PATH environment variable to tell WebKit's build system where the checkout is. WebKit's build system will still configure/make LLVM as necessary every time you build WebKit. |
| 45 | |
| 46 | - You can build LLVM yourself and opt out of WebKit building it for you. The process for this is a bit convoluted, but it does work. After you build LLVM, use the Tools/Scripts/export-llvm-build script to create tarballs of LLVM's headers and libraries. Then use the LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE environment variables to tell us where you put those tarballs. |
| 47 | |
| 48 | For further information, consult the Tools/Scripts/copy-webkitlibraries-to-product-directory script, which handles all of this magic. |
| 49 | |
| 50 | == Running |