Skip to content

Commit 23c8f89

Browse files
committed
Revert "Don't compile ldb tool into static library"
This reverts commit e296577.
1 parent a347ffe commit 23c8f89

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

Makefile

+5-9
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,13 @@ TESTS = \
106106
geodb_test
107107

108108
TOOLS = \
109-
sst_dump \
109+
sst_dump \
110110
db_sanity_test \
111-
db_stress \
112-
ldb \
111+
db_stress \
112+
ldb \
113113
db_repl_stress \
114114
blob_store_bench
115115

116-
LDB_OBJECTS = \
117-
tools/ldb_cmd.o \
118-
tools/ldb_tool.o
119-
120116

121117
PROGRAMS = db_bench signal_test table_reader_bench $(TESTS) $(TOOLS)
122118
BENCHMARKS = db_bench_sqlite3 db_bench_tree_db table_reader_bench
@@ -414,8 +410,8 @@ auto_roll_logger_test: util/auto_roll_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
414410
sst_dump: tools/sst_dump.o $(LIBOBJECTS)
415411
$(CXX) tools/sst_dump.o $(LIBOBJECTS) $(EXEC_LDFLAGS) -o $@ $(LDFLAGS) $(COVERAGEFLAGS)
416412

417-
ldb: tools/ldb.o $(LDB_OBJECTS) $(LIBOBJECTS)
418-
$(CXX) tools/ldb.o $(LDB_OBJECTS) $(LIBOBJECTS) $(EXEC_LDFLAGS) -o $@ $(LDFLAGS) $(COVERAGEFLAGS)
413+
ldb: tools/ldb.o $(LIBOBJECTS)
414+
$(CXX) tools/ldb.o $(LIBOBJECTS) $(EXEC_LDFLAGS) -o $@ $(LDFLAGS) $(COVERAGEFLAGS)
419415

420416
# ---------------------------------------------------------------------------
421417
# Jni stuff

tools/ldb_tool.h include/rocksdb/ldb_tool.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// This source code is licensed under the BSD-style license found in the
33
// LICENSE file in the root directory of this source tree. An additional grant
44
// of patent rights can be found in the PATENTS file in the same directory.
5-
#pragma once
6-
5+
#ifndef STORAGE_ROCKSDB_INCLUDE_LDB_TOOL_H
6+
#define STORAGE_ROCKSDB_INCLUDE_LDB_TOOL_H
77
#include "rocksdb/options.h"
88

99
namespace rocksdb {
@@ -14,3 +14,5 @@ class LDBTool {
1414
};
1515

1616
} // namespace rocksdb
17+
18+
#endif // STORAGE_ROCKSDB_INCLUDE_LDB_TOOL_H

tools/ldb.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// of patent rights can be found in the PATENTS file in the same directory.
55
//
66

7-
#include "tools/ldb_tool.h"
7+
#include "rocksdb/ldb_tool.h"
88

99
int main(int argc, char** argv) {
1010
rocksdb::LDBTool tool;

tools/ldb_cmd.cc util/ldb_cmd.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// LICENSE file in the root directory of this source tree. An additional grant
44
// of patent rights can be found in the PATENTS file in the same directory.
55
//
6-
#include "tools/ldb_cmd.h"
6+
#include "util/ldb_cmd.h"
77

88
#include "db/dbformat.h"
99
#include "db/db_impl.h"

tools/ldb_cmd.h util/ldb_cmd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "rocksdb/iterator.h"
1818
#include "rocksdb/slice.h"
1919
#include "util/logging.h"
20-
#include "tools/ldb_cmd_execute_result.h"
20+
#include "util/ldb_cmd_execute_result.h"
2121
#include "util/string_util.h"
2222
#include "utilities/utility_db.h"
2323
#include "utilities/ttl/db_ttl.h"
File renamed without changes.

tools/ldb_tool.cc util/ldb_tool.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// LICENSE file in the root directory of this source tree. An additional grant
44
// of patent rights can be found in the PATENTS file in the same directory.
55
//
6-
#include "tools/ldb_tool.h"
7-
#include "tools/ldb_cmd.h"
6+
#include "rocksdb/ldb_tool.h"
7+
#include "util/ldb_cmd.h"
88

99
namespace rocksdb {
1010

0 commit comments

Comments
 (0)