| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
| 6 | 6 |
| 7 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ] | 7 defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ] |
| 8 | 8 |
| 9 config("leveldatabase_config") { | 9 config("leveldatabase_config") { |
| 10 include_dirs = [ | 10 include_dirs = [ |
| 11 ".", | 11 ".", |
| 12 "src", | 12 "src", |
| 13 "src/include", | 13 "src/include", |
| 14 ] | 14 ] |
| 15 } | 15 } |
| 16 | 16 |
| 17 source_set("leveldatabase_opts.sse42") { |
| 18 sources = [ |
| 19 "src/port/port_posix_sse.cc", |
| 20 ] |
| 21 |
| 22 configs += [ ":leveldatabase_config" ] |
| 23 |
| 24 if (target_cpu == "x86" || target_cpu == "x64") { |
| 25 defines += [ "LEVELDB_PLATFORM_POSIX_SSE" ] |
| 26 if (!is_win || is_clang) { |
| 27 cflags = [ "-msse4.2" ] |
| 28 } |
| 29 } |
| 30 } |
| 31 |
| 17 static_library("leveldatabase") { | 32 static_library("leveldatabase") { |
| 18 sources = [ | 33 sources = [ |
| 19 "env_chromium.cc", | 34 "env_chromium.cc", |
| 20 "env_chromium.h", | 35 "env_chromium.h", |
| 21 "port/port_chromium.cc", | 36 "port/port_chromium.cc", |
| 22 "port/port_chromium.h", | 37 "port/port_chromium.h", |
| 23 "src/db/builder.cc", | 38 "src/db/builder.cc", |
| 24 "src/db/builder.h", | 39 "src/db/builder.h", |
| 25 "src/db/db_impl.cc", | 40 "src/db/db_impl.cc", |
| 26 "src/db/db_impl.h", | 41 "src/db/db_impl.h", |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 "src/util/random.h", | 116 "src/util/random.h", |
| 102 "src/util/status.cc", | 117 "src/util/status.cc", |
| 103 ] | 118 ] |
| 104 | 119 |
| 105 configs -= [ "//build/config/compiler:chromium_code" ] | 120 configs -= [ "//build/config/compiler:chromium_code" ] |
| 106 configs += [ "//build/config/compiler:no_chromium_code" ] | 121 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 107 | 122 |
| 108 public_configs = [ ":leveldatabase_config" ] | 123 public_configs = [ ":leveldatabase_config" ] |
| 109 | 124 |
| 110 deps = [ | 125 deps = [ |
| 126 ":leveldatabase_opts.sse42", |
| 111 "//base", | 127 "//base", |
| 112 "//base/third_party/dynamic_annotations", | 128 "//base/third_party/dynamic_annotations", |
| 113 "//third_party/re2", | 129 "//third_party/re2", |
| 114 "//third_party/snappy", | 130 "//third_party/snappy", |
| 115 ] | 131 ] |
| 116 | 132 |
| 117 if (is_win) { | 133 if (is_win) { |
| 118 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. | 134 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. |
| 119 | 135 |
| 120 if (is_official_build) { | 136 if (is_official_build) { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 ] | 362 ] |
| 347 | 363 |
| 348 configs -= [ "//build/config/compiler:chromium_code" ] | 364 configs -= [ "//build/config/compiler:chromium_code" ] |
| 349 configs += [ "//build/config/compiler:no_chromium_code" ] | 365 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 350 | 366 |
| 351 deps = [ | 367 deps = [ |
| 352 ":leveldb_testutil", | 368 ":leveldb_testutil", |
| 353 ] | 369 ] |
| 354 } | 370 } |
| 355 } | 371 } |
| OLD | NEW |