Skip to content

Commit 06d5331

Browse files
rlyerlymeta-codesync[bot]
authored andcommitted
Fix OSS build
Summary: - Add magic_enum manifest & add it as a dependency to cachelib - Fix folly exception tracer library names and add magic_enum library to cachelib_common target - Add folly::Subprocess dependency in benchmark targets - Fix compiler error in cachebench/binary_trace_gen.cpp - Add in AggregateStats.cpp to cachebench CMakeLists Reviewed By: pbhandar2 Differential Revision: D92866330 fbshipit-source-id: 855a0bbbb3380b46496971b50dfb60ae81230a60
1 parent 83b55ec commit 06d5331

7 files changed

Lines changed: 25 additions & 5 deletions

File tree

build/fbcode_builder/manifests/cachelib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ zstd
2525
mvfst
2626
numa
2727
libaio
28+
magic_enum
2829
# cachelib also depends on openssl but since the latter requires a platform-
2930
# specific configuration we rely on the folly manifest to provide this
3031
# dependency to avoid duplication.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[manifest]
2+
name = magic_enum
3+
4+
[download]
5+
url = https://github.com/Neargye/magic_enum/releases/download/v0.9.7/magic_enum-v0.9.7.tar.gz
6+
sha256 = c047bc7ca0b76752168140e7ae9a4a30d72bf6530c196fdfbf5105a39d40cc46
7+
8+
[build]
9+
builder = cmake
10+
11+
[cmake.defines]
12+
MAGIC_ENUM_OPT_BUILD_EXAMPLES = OFF
13+
MAGIC_ENUM_OPT_BUILD_TESTS = OFF
14+
MAGIC_ENUM_OPT_INSTALL = ON

cachelib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ find_package(Zstd REQUIRED)
122122
find_package(FBThrift REQUIRED) # must come after wangle
123123
find_package(NUMA REQUIRED)
124124
find_package(Sparsemap REQUIRED)
125+
find_package(magic_enum CONFIG REQUIRED)
125126

126127
find_package(uring)
127128
if (NOT uring_FOUND)

cachelib/benchmarks/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if (BUILD_TESTS)
2424
cachelib_datatype
2525
cachelib_allocator
2626
Folly::follybenchmark
27+
Folly::folly_subprocess
2728
glog::glog
2829
gflags
2930
GTest::gtest

cachelib/cachebench/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ add_library (cachelib_cachebench
2929
./runner/ProgressTracker.cpp
3030
./runner/Runner.cpp
3131
./runner/Stressor.cpp
32+
./util/AggregateStats.cpp
3233
./util/CacheConfig.cpp
3334
./util/Config.cpp
3435
./util/NandWrites.cpp

cachelib/cachebench/binary_trace_gen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ int main(int argc, char** argv) {
5858
std::cout << "Binary Trace Generator" << std::endl;
5959

6060
try {
61-
auto generator =
62-
std::make_unique<KVReplayGenerator>(config.getStressorConfig());
61+
auto generator = std::make_unique<KVReplayGenerator>(
62+
config.getStressorConfig(/* instanceId */ 0));
6363
} catch (const std::exception& e) {
6464
std::cout << "Invalid configuration. Exception: " << e.what() << std::endl;
6565
return 1;

cachelib/common/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ target_link_libraries(cachelib_common PUBLIC
4040
Threads::Threads
4141
FBThrift::thriftcpp2
4242
FBThrift::thriftprotocol
43+
FBThrift::thrift_dynamic_value
4344
Folly::folly
4445
Folly::follybenchmark
45-
Folly::folly_exception_tracer
46-
Folly::folly_exception_tracer_base
47-
Folly::folly_exception_counter
46+
Folly::folly_debugging_exception_tracer_exception_tracer
47+
Folly::folly_debugging_exception_tracer_exception_tracer_base
48+
Folly::folly_debugging_exception_tracer_exception_counter
4849
GTest::gtest
50+
magic_enum::magic_enum
4951
${XXHASH_LIBRARY}
5052
)
5153

0 commit comments

Comments
 (0)