Bug 131060 - [CMake] LevelDB is built without proper OS_* definitions
Summary: [CMake] LevelDB is built without proper OS_* definitions
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-01 14:12 PDT by Raphael Kubo da Costa (:rakuco)
Modified: 2014-09-16 10:17 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa (:rakuco) 2014-04-01 14:12:42 PDT
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.
Comment 1 Martin Robinson 2014-09-16 10:17:35 PDT
I believe that LevelDB has been removed now.