| 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 = [ |
| 11 "amalgamation/sqlite3.h", | 11 "amalgamation/sqlite3.h", |
| 12 "amalgamation/sqlite3.c", | 12 "amalgamation/sqlite3.c", |
| 13 |
| 13 # fts2.c currently has a lot of conflicts when added to | 14 # fts2.c currently has a lot of conflicts when added to |
| 14 # the amalgamation. It is probably not worth fixing that. | 15 # the amalgamation. It is probably not worth fixing that. |
| 15 "src/ext/fts2/fts2.c", | 16 "src/ext/fts2/fts2.c", |
| 16 "src/ext/fts2/fts2.h", | 17 "src/ext/fts2/fts2.h", |
| 17 "src/ext/fts2/fts2_hash.c", | 18 "src/ext/fts2/fts2_hash.c", |
| 18 "src/ext/fts2/fts2_hash.h", | 19 "src/ext/fts2/fts2_hash.h", |
| 19 "src/ext/fts2/fts2_icu.c", | 20 "src/ext/fts2/fts2_icu.c", |
| 20 "src/ext/fts2/fts2_porter.c", | 21 "src/ext/fts2/fts2_porter.c", |
| 21 "src/ext/fts2/fts2_tokenizer.c", | 22 "src/ext/fts2/fts2_tokenizer.c", |
| 22 "src/ext/fts2/fts2_tokenizer.h", | 23 "src/ext/fts2/fts2_tokenizer.h", |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 "SQLITE_TEMP_STORE=3", | 75 "SQLITE_TEMP_STORE=3", |
| 75 "SQLITE_ENABLE_FTS3_BACKWARDS", | 76 "SQLITE_ENABLE_FTS3_BACKWARDS", |
| 76 "DSQLITE_DEFAULT_FILE_FORMAT=4", | 77 "DSQLITE_DEFAULT_FILE_FORMAT=4", |
| 77 ] | 78 ] |
| 78 } | 79 } |
| 79 | 80 |
| 80 if (is_clang) { | 81 if (is_clang) { |
| 81 cflags += [ | 82 cflags += [ |
| 82 # sqlite does `if (*a++ && *b++);` in a non-buggy way. | 83 # sqlite does `if (*a++ && *b++);` in a non-buggy way. |
| 83 "-Wno-empty-body", | 84 "-Wno-empty-body", |
| 85 |
| 84 # sqlite has some `unsigned < 0` checks. | 86 # sqlite has some `unsigned < 0` checks. |
| 85 "-Wno-tautological-compare", | 87 "-Wno-tautological-compare", |
| 88 |
| 86 # Needed because we don't have this commit yet: | 89 # Needed because we don't have this commit yet: |
| 87 # https://github.com/mackyle/sqlite/commit/25df0fa050dcc9be7fb937b8e25be24
049b3fef0 | 90 # https://github.com/mackyle/sqlite/commit/25df0fa050dcc9be7fb937b8e25be24
049b3fef0 |
| 88 "-Wno-pointer-bool-conversion", | 91 "-Wno-pointer-bool-conversion", |
| 89 ] | 92 ] |
| 90 } | 93 } |
| 91 | 94 |
| 92 public_configs = [ ":sqlite_config" ] | 95 public_configs = [ ":sqlite_config" ] |
| 93 | 96 |
| 94 deps = [ | 97 deps = [ |
| 95 "//third_party/icu", | 98 "//third_party/icu", |
| 96 ] | 99 ] |
| 97 } | 100 } |
| 98 | 101 |
| 99 if (is_linux) { | 102 if (is_linux) { |
| 100 executable("sqlite_shell") { | 103 executable("sqlite_shell") { |
| 101 sources = [ | 104 sources = [ |
| 102 "src/src/shell.c", | 105 "src/src/shell.c", |
| 103 "src/src/shell_icu_linux.c", | 106 "src/src/shell_icu_linux.c", |
| 107 |
| 104 # Include a dummy c++ file to force linking of libstdc++. | 108 # Include a dummy c++ file to force linking of libstdc++. |
| 105 "build_as_cpp.cc", | 109 "build_as_cpp.cc", |
| 106 ] | 110 ] |
| 107 | 111 |
| 108 deps = [ | 112 deps = [ |
| 109 ":sqlite", | 113 ":sqlite", |
| 110 "//third_party/icu", | 114 "//third_party/icu", |
| 111 ] | 115 ] |
| 112 } | 116 } |
| 113 } | 117 } |
| 114 | 118 |
| 115 if (is_ios) { | 119 if (is_ios) { |
| 116 source_set("sqlite_regexp") { | 120 source_set("sqlite_regexp") { |
| 117 sources = [ "src/ext/icu/icu.c" ] | 121 sources = [ |
| 118 deps = [ "//third_party/icu" ] | 122 "src/ext/icu/icu.c", |
| 123 ] |
| 124 deps = [ |
| 125 "//third_party/icu", |
| 126 ] |
| 119 } | 127 } |
| 120 } | 128 } |
| OLD | NEW |