File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed
Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -460,6 +460,14 @@ fn buildRocksDB(
460460
461461 if (enable_snappy ) {
462462 libsnappy .linkLibCpp ();
463+ librocksdb .linkLibrary (libsnappy );
464+
465+ const flags = .{
466+ "-std=c++11" ,
467+ "-fno-exceptions" ,
468+ "-fno-rtti" ,
469+ "-Wno-sign-compare" ,
470+ };
463471
464472 libsnappy .addCSourceFiles (.{
465473 .root = snappy_dep .path ("." ),
@@ -469,15 +477,23 @@ fn buildRocksDB(
469477 "snappy-stubs-internal.cc" ,
470478 "snappy.cc" ,
471479 },
472- .flags = &.{
473- "-std=c++11" ,
474- "-fno-exceptions" ,
475- "-fno-rtti" ,
476- "-Wno-sign-compare" ,
477- },
480+ .flags = & flags ,
478481 });
479482
480- librocksdb .linkLibrary (libsnappy );
483+ const build_version = b .addConfigHeader (.{
484+ .style = .{ .cmake = snappy_dep .path ("snappy-stubs-public.h.in" ) },
485+ .include_path = "snappy-stubs-public.h" ,
486+ }, .{
487+ .PROJECT_VERSION_MAJOR = 1 ,
488+ .PROJECT_VERSION_MINOR = 2 ,
489+ .PROJECT_VERSION_PATCH = 2 ,
490+ .HAVE_SYS_UIO_H_01 = 1 ,
491+ });
492+ libsnappy .addCSourceFile (.{
493+ .file = build_version .getOutput (),
494+ .language = .cpp ,
495+ .flags = & flags ,
496+ });
481497 }
482498
483499 // platform dependent stuff
You can’t perform that action at this time.
0 commit comments