[webkit-help] WebKit with LLVM/Clang 3.1

Keaton Mowery kmowery at gmail.com
Tue Jun 5 15:06:53 PDT 2012


Hi all,

We're trying to compile WebKit with LLVM 3.1, and running into some
issues. Our plan is to modify LLVM to do some analysis and
instrumentation of WebKit, so we can't use the LLVM as shipped on OSX.

Unfortunately, this doesn't work with WebKit r119519 (or any rev we've
tested from the past few months). Here's the error we get:

-------
ERROR: WebKit2 has a weak external symbol in it
(/Users/kmowery/src/builds/webkit/WebKit/WebKitBuild/Release/WebKit2.framework/Versions/A/WebKit2)
ERROR: A weak external symbol is generated when a symbol is defined in
multiple compilation units and is also marked as being exported from
the library.
ERROR: A common cause of weak external symbols is when an inline
function is listed in the linker export file.
ERROR: symbol operator new(unsigned long)
Command /bin/sh failed with exit code 1
-------

And here's how to reproduce:

1. Download and untar
http://llvm.org/releases/3.1/clang+llvm-3.1-x86_64-apple-darwin11.tar.gz

2. export LLVMDIR="/where/llvm/untarred/"

3. cd into WebKit,
      $ CC=${LLVMDIR}/bin/clang  CXX=${LLVMDIR}/build/clang
./Tools/Scripts/build-webkit -verbose

Is there a better way to switch compilers in the build-webkit XCode
project, or does this represent a bug in WebKit?

Thank you!

Keaton Mowery
UC San Diego


More information about the webkit-help mailing list