At the moment, we just build LevelDB as part of WebCore without actually integrating it into WebKit. LevelDB expects its `build_detect_platform' script to be run by its Makefile so that things such as operating system as well as some compiler flags are set. The compiler flags can probably be ignored as we'd like to use the same ones we use to build the rest of WebKit, but the OS_* definitions are needed so that we don't always end up in the #else case in OS checks and break everything that is not glibc. Possible solutions: * Do the OS detection in CMake by peeking at ${CMAKE_SYSTEM_NAME} and passing -DOS_FOO=1 via add_definitions(), in a similar fashion to what was previously done with autotools for the GTK+ port. * Include WebCore's config.h in LevelDB and translate the WTF_OS_* defines into OS_* ones. * Include WebCore's config.h and change the OS_* checks into WTF_OS_* ones. The last two options look cleaner, but make importing new versions of LevelDB from upstream a more manual process.
I believe that LevelDB has been removed now.