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 |
36 source_set("cld2_data") { | 44 source_set("cld2_data") { |
37 sources = gypi_values.cld2_data_sources | 45 sources = gypi_values.cld2_data_sources |
38 if (cld2_table_size == 0) { | 46 if (cld2_table_size == 0) { |
39 sources += gypi_values.cld2_data_smallest_sources | 47 sources += gypi_values.cld2_data_smallest_sources |
40 } else if (cld2_table_size == 2) { | 48 } else if (cld2_table_size == 2) { |
41 sources += gypi_values.cld2_data_largest_sources | 49 sources += gypi_values.cld2_data_largest_sources |
42 } | 50 } |
43 | 51 |
44 include_dirs = [ | 52 include_dirs = [ |
45 "src/internal", | 53 "src/internal", |
46 "src/public", | 54 "src/public", |
47 ] | 55 ] |
48 | 56 |
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 } | |
55 configs -= [ "//build/config/compiler:chromium_code" ] | 57 configs -= [ "//build/config/compiler:chromium_code" ] |
56 configs += [ "//build/config/compiler:no_chromium_code" ] | 58 configs += [ |
57 configs += [ ":cld2_data_warnings" ] | 59 ":cld2_data_warnings", |
| 60 "//build/config/compiler:no_chromium_code", |
| 61 ] |
58 } | 62 } |
59 | 63 |
60 # As in the corresponding gyp file, this just builds the core interfaces for | 64 # As in the corresponding gyp file, this just builds the core interfaces for |
61 # CLD2. You must still declare a dependency on a specific data set, either | 65 # CLD2. You must still declare a dependency on a specific data set, either |
62 # cld2_dynamic or cld2_static. | 66 # cld2_dynamic or cld2_static. |
63 source_set("cld_2") { | 67 source_set("cld_2") { |
64 sources = gypi_values.cld2_core_sources | 68 sources = gypi_values.cld2_core_sources |
65 include_dirs = [ | 69 include_dirs = [ |
66 "src/internal", | 70 "src/internal", |
67 "src/public", | 71 "src/public", |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ":cld2_dynamic", | 151 ":cld2_dynamic", |
148 ] | 152 ] |
149 | 153 |
150 configs -= [ "//build/config/compiler:chromium_code" ] | 154 configs -= [ "//build/config/compiler:chromium_code" ] |
151 configs += [ | 155 configs += [ |
152 ":cld2_dynamic_mode_config", | 156 ":cld2_dynamic_mode_config", |
153 "//build/config/compiler:no_chromium_code", | 157 "//build/config/compiler:no_chromium_code", |
154 ] | 158 ] |
155 } | 159 } |
156 } | 160 } |
OLD | NEW |