]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/buckifier/targets_cfg.py
1 from __future__
import absolute_import
2 from __future__
import division
3 from __future__
import print_function
4 from __future__
import unicode_literals
5 rocksdb_target_header
= """REPO_PATH = "internal_repo_rocksdb/repo/"
6 BUCK_BINS = "buck-out/gen/" + REPO_PATH
7 TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh"
8 rocksdb_compiler_flags = [
11 "-fno-builtin-memcmp",
12 "-DROCKSDB_PLATFORM_POSIX",
13 "-DROCKSDB_LIB_IO_POSIX",
14 "-DROCKSDB_FALLOCATE_PRESENT",
15 "-DROCKSDB_MALLOC_USABLE_SIZE",
17 # Flags to enable libs we include
26 # Needed to compile in fbcode
27 "-Wno-expansion-to-defined",
30 rocksdb_external_deps = [
31 ('bzip2', None, 'bz2'),
32 ('snappy', None, "snappy"),
34 ('gflags', None, 'gflags'),
38 ("numa", "2.0.8", "numa"),
39 ("googletest", None, "gtest"),
42 rocksdb_preprocessor_flags = [
43 # Directories with files for #include
44 "-I" + REPO_PATH + "include/",
50 library_template
= """
56 preprocessor_flags = rocksdb_preprocessor_flags,
57 compiler_flags = rocksdb_compiler_flags,
58 external_deps = rocksdb_external_deps,
67 preprocessor_flags = rocksdb_preprocessor_flags,
68 compiler_flags = rocksdb_compiler_flags,
69 external_deps = rocksdb_external_deps,
73 unittests_template
= """
74 # [test_name, test_src, test_type]
78 # Generate a test rule for each entry in ROCKS_TESTS
79 for test_cfg in ROCKS_TESTS:
80 test_name = test_cfg[0]
82 ttype = "gtest" if test_cfg[2] == "parallel" else "simple"
83 test_bin = test_name + "_bin"
88 deps = [":rocksdb_test_lib"],
89 preprocessor_flags = rocksdb_preprocessor_flags,
90 compiler_flags = rocksdb_compiler_flags,
91 external_deps = rocksdb_external_deps,
97 deps = [":" + test_bin],
98 command = [TEST_RUNNER, BUCK_BINS + test_bin]
102 name = "make_rocksdbjavastatic",
104 command = ["internal_repo_rocksdb/make_rocksdbjavastatic.sh"],
108 name = "make_rocksdb_lite_release",
110 command = ["internal_repo_rocksdb/make_rocksdb_lite_release.sh"],