Commit a1340878 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook GitHub Bot

eden: enable rocksdb in the windows build

Summary:
In the initial stages of the windows port we had
problems building rocksdb on windows, so we disabled it.

These days we're able to build it and detect it--we even
require it in the cmake code, but hadn't gotten around
to telling the rest of the code that we can use it.

This commit re-enables it in the build but leaves sqlite
as the default engine until we're able to perform some
benchmarking.

Rocksdb itself has some build issues on Windows; it doesn't
use cmake to locate dependencies, so even though we built
snappy it doesn't know how to find it without modifying the
source:
https://github.com/facebook/rocksdb/blob/master/thirdparty.inc#L4

For that reason, we disable the use of Snappy in the Windows build.
However, in the version of rocksdb that we were using, it would
default to trying to use Snappy even though it wasn't compiled in
and throw an exception.

I've upgraded to a newer version of rocksdb that will simply not
use compression if no compression was enabled at build time.

Given that we mostly store relatively small objects, I'm assuming
that the lack of compression is fine for now.

Reviewed By: xavierd

Differential Revision: D21319896

fbshipit-source-id: 2a2d06d4bd5382706e9220f9b4a2de99dc18311d
parent 27cfd48e
...@@ -428,6 +428,10 @@ if __name__ == "__main__": ...@@ -428,6 +428,10 @@ if __name__ == "__main__":
ccache = path_search(env, "ccache") ccache = path_search(env, "ccache")
if ccache: if ccache:
defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache
else:
# rocksdb does its own probing for ccache.
# Ensure that it is disabled on sandcastle
env["CCACHE_DISABLE"] = "1"
if "GITHUB_ACTIONS" in os.environ and self.build_opts.is_windows(): if "GITHUB_ACTIONS" in os.environ and self.build_opts.is_windows():
# GitHub actions: the host has both gcc and msvc installed, and # GitHub actions: the host has both gcc and msvc installed, and
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
name = rocksdb name = rocksdb
[download] [download]
url = https://github.com/facebook/rocksdb/archive/v5.18.3.tar.gz url = https://github.com/facebook/rocksdb/archive/v6.8.1.tar.gz
sha256 = 7fb6738263d3f2b360d7468cf2ebe333f3109f3ba1ff80115abd145d75287254 sha256 = ca192a06ed3bcb9f09060add7e9d0daee1ae7a8705a3d5ecbe41867c5e2796a2
[dependencies] [dependencies]
lz4 lz4
...@@ -11,12 +11,13 @@ snappy ...@@ -11,12 +11,13 @@ snappy
[build] [build]
builder = cmake builder = cmake
subdir = rocksdb-5.18.3 subdir = rocksdb-6.8.1
[cmake.defines] [cmake.defines]
WITH_SNAPPY=ON WITH_SNAPPY=ON
WITH_LZ4=ON WITH_LZ4=OFF
WITH_TESTS=OFF WITH_TESTS=OFF
WITH_BENCHMARK_TOOLS=OFF
# We get relocation errors with the static gflags lib, # We get relocation errors with the static gflags lib,
# and there's no clear way to make it pick the shared gflags # and there's no clear way to make it pick the shared gflags
# so just turn it off. # so just turn it off.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment