leveldb.BUILD 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. package(default_visibility = ["//visibility:public"])
  16. config_setting(
  17. name = "darwin",
  18. values = {"cpu": "darwin"},
  19. visibility = ["//visibility:public"],
  20. )
  21. SOURCES = ["db/builder.cc",
  22. "db/c.cc",
  23. "db/dbformat.cc",
  24. "db/db_impl.cc",
  25. "db/db_iter.cc",
  26. "db/dumpfile.cc",
  27. "db/filename.cc",
  28. "db/log_reader.cc",
  29. "db/log_writer.cc",
  30. "db/memtable.cc",
  31. "db/repair.cc",
  32. "db/table_cache.cc",
  33. "db/version_edit.cc",
  34. "db/version_set.cc",
  35. "db/write_batch.cc",
  36. "table/block_builder.cc",
  37. "table/block.cc",
  38. "table/filter_block.cc",
  39. "table/format.cc",
  40. "table/iterator.cc",
  41. "table/merger.cc",
  42. "table/table_builder.cc",
  43. "table/table.cc",
  44. "table/two_level_iterator.cc",
  45. "util/arena.cc",
  46. "util/bloom.cc",
  47. "util/cache.cc",
  48. "util/coding.cc",
  49. "util/comparator.cc",
  50. "util/crc32c.cc",
  51. "util/env.cc",
  52. "util/env_posix.cc",
  53. "util/filter_policy.cc",
  54. "util/hash.cc",
  55. "util/histogram.cc",
  56. "util/logging.cc",
  57. "util/options.cc",
  58. "util/status.cc",
  59. "port/port_posix.cc",
  60. "port/port_posix_sse.cc",
  61. "helpers/memenv/memenv.cc",
  62. ]
  63. cc_library(
  64. name = "leveldb",
  65. srcs = SOURCES,
  66. hdrs = glob([
  67. "helpers/memenv/*.h",
  68. "util/*.h",
  69. "port/*.h",
  70. "port/win/*.h",
  71. "table/*.h",
  72. "db/*.h",
  73. "include/leveldb/*.h"
  74. ],
  75. exclude = [
  76. "**/*test.*",
  77. ]),
  78. includes = [
  79. "include/",
  80. ],
  81. copts = [
  82. "-fno-builtin-memcmp",
  83. "-DLEVELDB_PLATFORM_POSIX=1",
  84. "-DLEVELDB_ATOMIC_PRESENT",
  85. ],
  86. defines = [
  87. "LEVELDB_PLATFORM_POSIX",
  88. ] + select({
  89. ":darwin": ["OS_MACOSX"],
  90. "//conditions:default": [],
  91. }),
  92. )