1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ]
9 config("leveldatabase_config") {
17 static_library("leveldatabase") {
21 "port/port_chromium.cc",
22 "port/port_chromium.h",
34 "src/db/log_format.h",
35 "src/db/log_reader.cc",
36 "src/db/log_reader.h",
37 "src/db/log_writer.cc",
38 "src/db/log_writer.h",
44 "src/db/table_cache.cc",
45 "src/db/table_cache.h",
46 "src/db/version_edit.cc",
47 "src/db/version_edit.h",
48 "src/db/version_set.cc",
49 "src/db/version_set.h",
50 "src/db/write_batch.cc",
51 "src/db/write_batch_internal.h",
52 "src/helpers/memenv/memenv.cc",
53 "src/helpers/memenv/memenv.h",
54 "src/include/leveldb/cache.h",
55 "src/include/leveldb/comparator.h",
56 "src/include/leveldb/db.h",
57 "src/include/leveldb/dumpfile.h",
58 "src/include/leveldb/env.h",
59 "src/include/leveldb/filter_policy.h",
60 "src/include/leveldb/iterator.h",
61 "src/include/leveldb/options.h",
62 "src/include/leveldb/slice.h",
63 "src/include/leveldb/status.h",
64 "src/include/leveldb/table.h",
65 "src/include/leveldb/table_builder.h",
66 "src/include/leveldb/write_batch.h",
70 "src/table/block_builder.cc",
71 "src/table/block_builder.h",
72 "src/table/filter_block.cc",
73 "src/table/filter_block.h",
74 "src/table/format.cc",
76 "src/table/iterator.cc",
77 "src/table/iterator_wrapper.h",
78 "src/table/merger.cc",
81 "src/table/table_builder.cc",
82 "src/table/two_level_iterator.cc",
83 "src/table/two_level_iterator.h",
90 "src/util/comparator.cc",
94 "src/util/filter_policy.cc",
97 "src/util/logging.cc",
99 "src/util/mutexlock.h",
100 "src/util/options.cc",
102 "src/util/status.cc",
105 configs -= [ "//build/config/compiler:chromium_code" ]
106 configs += [ "//build/config/compiler:no_chromium_code" ]
108 public_configs = [ ":leveldatabase_config" ]
112 "//base/third_party/dynamic_annotations",
114 "//third_party/snappy",
118 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison.
123 test("env_chromium_unittests") {
125 "env_chromium_unittest.cc",
129 "//base/test:test_support",
134 static_library("leveldb_testutil") {
136 "src/util/histogram.cc",
137 "src/util/histogram.h",
138 "src/util/testharness.cc",
139 "src/util/testharness.h",
140 "src/util/testutil.cc",
141 "src/util/testutil.h",
144 configs -= [ "//build/config/compiler:chromium_code" ]
145 configs += [ "//build/config/compiler:no_chromium_code" ]
155 test("leveldb_arena_test") {
157 "src/util/arena_test.cc",
159 configs -= [ "//build/config/compiler:chromium_code" ]
160 configs += [ "//build/config/compiler:no_chromium_code" ]
166 test("leveldb_bloom_test") {
168 "src/util/bloom_test.cc",
170 configs -= [ "//build/config/compiler:chromium_code" ]
171 configs += [ "//build/config/compiler:no_chromium_code" ]
177 test("leveldb_cache_test") {
179 "src/util/cache_test.cc",
181 configs -= [ "//build/config/compiler:chromium_code" ]
182 configs += [ "//build/config/compiler:no_chromium_code" ]
188 test("leveldb_corruption_test") {
190 "src/db/corruption_test.cc",
192 configs -= [ "//build/config/compiler:chromium_code" ]
193 configs += [ "//build/config/compiler:no_chromium_code" ]
199 test("leveldb_crc32c_test") {
201 "src/util/crc32c_test.cc",
203 configs -= [ "//build/config/compiler:chromium_code" ]
204 configs += [ "//build/config/compiler:no_chromium_code" ]
210 test("leveldb_db_bench") {
212 "src/db/db_bench.cc",
214 configs -= [ "//build/config/compiler:chromium_code" ]
215 configs += [ "//build/config/compiler:no_chromium_code" ]
221 test("leveldb_db_test") {
225 configs -= [ "//build/config/compiler:chromium_code" ]
226 configs += [ "//build/config/compiler:no_chromium_code" ]
232 test("leveldb_dbformat_test") {
234 "src/db/dbformat_test.cc",
236 configs -= [ "//build/config/compiler:chromium_code" ]
237 configs += [ "//build/config/compiler:no_chromium_code" ]
243 test("leveldb_env_test") {
245 "src/util/env_test.cc",
247 configs -= [ "//build/config/compiler:chromium_code" ]
248 configs += [ "//build/config/compiler:no_chromium_code" ]
254 test("leveldb_filename_test") {
256 "src/db/filename_test.cc",
258 configs -= [ "//build/config/compiler:chromium_code" ]
259 configs += [ "//build/config/compiler:no_chromium_code" ]
265 test("leveldb_filter_block_test") {
267 "src/table/filter_block_test.cc",
269 configs -= [ "//build/config/compiler:chromium_code" ]
270 configs += [ "//build/config/compiler:no_chromium_code" ]
276 test("leveldb_log_test") {
278 "src/db/log_test.cc",
280 configs -= [ "//build/config/compiler:chromium_code" ]
281 configs += [ "//build/config/compiler:no_chromium_code" ]
287 test("leveldb_skiplist_test") {
289 "src/db/skiplist_test.cc",
291 configs -= [ "//build/config/compiler:chromium_code" ]
292 configs += [ "//build/config/compiler:no_chromium_code" ]
298 test("leveldb_table_test") {
300 "src/table/table_test.cc",
302 configs -= [ "//build/config/compiler:chromium_code" ]
303 configs += [ "//build/config/compiler:no_chromium_code" ]
309 test("leveldb_version_edit_test") {
311 "src/db/version_edit_test.cc",
313 configs -= [ "//build/config/compiler:chromium_code" ]
314 configs += [ "//build/config/compiler:no_chromium_code" ]
320 test("leveldb_write_batch_test") {
322 "src/db/write_batch_test.cc",
324 configs -= [ "//build/config/compiler:chromium_code" ]
325 configs += [ "//build/config/compiler:no_chromium_code" ]