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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 gypi_values = exec_script("//build/gypi_to_gn.py", | 7 gypi_values = exec_script("//build/gypi_to_gn.py", |
8 [ rebase_path("cld_2.gyp") ], | 8 [ rebase_path("cld_2.gyp") ], |
9 "scope", | 9 "scope", |
10 [ "cld_2.gyp" ]) | 10 [ "cld_2.gyp" ]) |
(...skipping 15 matching lines...) Expand all Loading... |
26 # | 26 # |
27 # Maintainers: | 27 # Maintainers: |
28 # This value may be reasonably tweaked on a per-platform basis. | 28 # This value may be reasonably tweaked on a per-platform basis. |
29 # Don't forget to update this file as well to match: | 29 # Don't forget to update this file as well to match: |
30 # components/translate/content/browser/browser_cld_utils.cc | 30 # components/translate/content/browser/browser_cld_utils.cc |
31 # components/translate/content/renderer/renderer_cld_utils.cc | 31 # components/translate/content/renderer/renderer_cld_utils.cc |
32 cld2_platform_support = "static" | 32 cld2_platform_support = "static" |
33 | 33 |
34 cld2_table_size = 2 | 34 cld2_table_size = 2 |
35 | 35 |
36 config("cld2_data_warnings") { | |
37 visibility = [ ":*" ] | |
38 if (is_clang) { | |
39 # The generated files don't have braces around subobject initializers. | |
40 cflags = [ "-Wno-missing-braces" ] | |
41 } | |
42 } | |
43 | |
44 source_set("cld2_data") { | 36 source_set("cld2_data") { |
45 sources = gypi_values.cld2_data_sources | 37 sources = gypi_values.cld2_data_sources |
46 if (cld2_table_size == 0) { | 38 if (cld2_table_size == 0) { |
47 sources += gypi_values.cld2_data_smallest_sources | 39 sources += gypi_values.cld2_data_smallest_sources |
48 } else if (cld2_table_size == 2) { | 40 } else if (cld2_table_size == 2) { |
49 sources += gypi_values.cld2_data_largest_sources | 41 sources += gypi_values.cld2_data_largest_sources |
50 } | 42 } |
51 | 43 |
52 include_dirs = [ | 44 include_dirs = [ |
53 "src/internal", | 45 "src/internal", |
54 "src/public", | 46 "src/public", |
55 ] | 47 ] |
56 | 48 |
| 49 config("cld2_data_warnings") { |
| 50 if (is_clang) { |
| 51 # The generated files don't have braces around subobject initializers. |
| 52 cflags = [ "-Wno-missing-braces" ] |
| 53 } |
| 54 } |
57 configs -= [ "//build/config/compiler:chromium_code" ] | 55 configs -= [ "//build/config/compiler:chromium_code" ] |
58 configs += [ | 56 configs += [ "//build/config/compiler:no_chromium_code" ] |
59 ":cld2_data_warnings", | 57 configs += [ ":cld2_data_warnings" ] |
60 "//build/config/compiler:no_chromium_code", | |
61 ] | |
62 } | 58 } |
63 | 59 |
64 # As in the corresponding gyp file, this just builds the core interfaces for | 60 # As in the corresponding gyp file, this just builds the core interfaces for |
65 # CLD2. You must still declare a dependency on a specific data set, either | 61 # CLD2. You must still declare a dependency on a specific data set, either |
66 # cld2_dynamic or cld2_static. | 62 # cld2_dynamic or cld2_static. |
67 source_set("cld_2") { | 63 source_set("cld_2") { |
68 sources = gypi_values.cld2_core_sources | 64 sources = gypi_values.cld2_core_sources |
69 include_dirs = [ | 65 include_dirs = [ |
70 "src/internal", | 66 "src/internal", |
71 "src/public", | 67 "src/public", |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 ":cld2_dynamic", | 147 ":cld2_dynamic", |
152 ] | 148 ] |
153 | 149 |
154 configs -= [ "//build/config/compiler:chromium_code" ] | 150 configs -= [ "//build/config/compiler:chromium_code" ] |
155 configs += [ | 151 configs += [ |
156 ":cld2_dynamic_mode_config", | 152 ":cld2_dynamic_mode_config", |
157 "//build/config/compiler:no_chromium_code", | 153 "//build/config/compiler:no_chromium_code", |
158 ] | 154 ] |
159 } | 155 } |
160 } | 156 } |
OLD | NEW |