OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 config("sqlite_config") { | 5 config("sqlite_config") { |
6 include_dirs = [ "." ] | 6 include_dirs = [ "." ] |
7 } | 7 } |
8 | 8 |
9 source_set("sqlite") { | 9 source_set("sqlite") { |
10 sources = [ | 10 sources = [ |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 if (is_posix) { | 36 if (is_posix) { |
37 defines += [ | 37 defines += [ |
38 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it | 38 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it |
39 # will have microsecond precision. Should only affect contended databases | 39 # will have microsecond precision. Should only affect contended databases |
40 # via the busy callback. Browser profile databases are mostly exclusive, | 40 # via the busy callback. Browser profile databases are mostly exclusive, |
41 # but renderer databases may allow for contention. | 41 # but renderer databases may allow for contention. |
42 "HAVE_USLEEP=1", | 42 "HAVE_USLEEP=1", |
43 ] | 43 ] |
44 } | 44 } |
| 45 if (is_linux || is_android) { |
| 46 defines += [ |
| 47 # Linux provides fdatasync(), a faster equivalent of fsync(). |
| 48 "fdatasync=fdatasync", |
| 49 ] |
| 50 } |
45 | 51 |
46 include_dirs = [ "amalgamation" ] | 52 include_dirs = [ "amalgamation" ] |
47 | 53 |
48 configs -= [ "//build/config/compiler:chromium_code" ] | 54 configs -= [ "//build/config/compiler:chromium_code" ] |
49 configs += [ "//build/config/compiler:no_chromium_code" ] | 55 configs += [ "//build/config/compiler:no_chromium_code" ] |
50 | 56 |
51 if (is_linux) { | 57 if (is_linux) { |
52 cflags += [ | 58 cflags += [ |
53 # SQLite doesn"t believe in compiler warnings, | 59 # SQLite doesn"t believe in compiler warnings, |
54 # preferring testing. | 60 # preferring testing. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 if (is_ios) { | 102 if (is_ios) { |
97 source_set("sqlite_regexp") { | 103 source_set("sqlite_regexp") { |
98 sources = [ | 104 sources = [ |
99 "src/ext/icu/icu.c", | 105 "src/ext/icu/icu.c", |
100 ] | 106 ] |
101 deps = [ | 107 deps = [ |
102 "//third_party/icu", | 108 "//third_party/icu", |
103 ] | 109 ] |
104 } | 110 } |
105 } | 111 } |
OLD | NEW |