Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: third_party/cld_2/BUILD.gn

Issue 2396183002: Switching from CLD3 to CLD2 (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/cld/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 declare_args() { 7 declare_args() {
8 if (is_android || is_ios) { 8 if (is_android || is_ios) {
9 cld2_table_size = 0 # Small, accurate tables 9 cld2_table_size = 0 # Small, accurate tables
10 } else { 10 } else {
11 cld2_table_size = 2 # Larger, more accurate tables 11 cld2_table_size = 2 # Larger, more accurate tables
12 } 12 }
13 } 13 }
14 14
15 gypi_values = exec_script("//build/gypi_to_gn.py",
16 [ rebase_path("cld_2.gyp") ],
17 "scope",
18 [ "cld_2.gyp" ])
19
20 config("cld2_data_warnings") { 15 config("cld2_data_warnings") {
21 visibility = [ ":*" ] 16 visibility = [ ":*" ]
22 if (is_clang) { 17 if (is_clang) {
23 # The generated files don't have braces around subobject initializers. 18 # The generated files don't have braces around subobject initializers.
24 cflags = [ "-Wno-missing-braces" ] 19 cflags = [ "-Wno-missing-braces" ]
25 } 20 }
26 } 21 }
27 22
28 static_library("cld2_data") { 23 static_library("cld2_data") {
29 sources = gypi_values.cld2_data_sources 24 sources = [
25 "src/internal/cld2_generated_cjk_compatible.cc",
26 "src/internal/cld2_generated_deltaoctachrome.cc",
27 "src/internal/cld2_generated_distinctoctachrome.cc",
28 "src/internal/cld_generated_cjk_delta_bi_4.cc",
29 "src/internal/cld_generated_cjk_uni_prop_80.cc",
30 "src/internal/cld_generated_score_quad_octa_2.cc",
31 "src/internal/generated_distinct_bi_0.cc",
32 ]
33
30 if (cld2_table_size == 0) { 34 if (cld2_table_size == 0) {
31 sources += gypi_values.cld2_data_smallest_sources 35 sources += [ "src/internal/cld2_generated_quadchrome_16.cc" ]
32 } else if (cld2_table_size == 2) { 36 } else if (cld2_table_size == 2) {
33 sources += gypi_values.cld2_data_largest_sources 37 sources += [ "src/internal/cld2_generated_quadchrome_2.cc" ]
34 } 38 }
35 39
36 include_dirs = [ 40 include_dirs = [
37 "src/internal", 41 "src/internal",
38 "src/public", 42 "src/public",
39 ] 43 ]
40 44
41 configs -= [ "//build/config/compiler:chromium_code" ] 45 configs -= [ "//build/config/compiler:chromium_code" ]
42 configs += [ 46 configs += [
43 "//build/config/compiler:no_chromium_code", 47 "//build/config/compiler:no_chromium_code",
(...skipping 10 matching lines...) Expand all
54 # https://code.google.com/p/cld2/issues/detail?id=37 58 # https://code.google.com/p/cld2/issues/detail?id=37
55 "-Wno-unused-private-field", 59 "-Wno-unused-private-field",
56 60
57 # offsetmap.cc uses a char as a subscript. 61 # offsetmap.cc uses a char as a subscript.
58 "-Wno-char-subscripts", 62 "-Wno-char-subscripts",
59 ] 63 ]
60 } 64 }
61 } 65 }
62 66
63 static_library("cld_2") { 67 static_library("cld_2") {
64 sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources 68 sources = [
69 "src/internal/cld2tablesummary.h",
70 "src/internal/cldutil.cc",
71 "src/internal/cldutil.h",
72 "src/internal/cldutil_shared.cc",
73 "src/internal/cldutil_shared.h",
74 "src/internal/compact_lang_det.cc",
75 "src/internal/compact_lang_det_hint_code.cc",
76 "src/internal/compact_lang_det_hint_code.h",
77 "src/internal/compact_lang_det_impl.cc",
78 "src/internal/compact_lang_det_impl.h",
79 "src/internal/debug.h",
80 "src/internal/debug_empty.cc",
81 "src/internal/fixunicodevalue.cc",
82 "src/internal/fixunicodevalue.h",
83 "src/internal/generated_entities.cc",
84 "src/internal/generated_language.cc",
85 "src/internal/generated_language.h",
86 "src/internal/generated_ulscript.cc",
87 "src/internal/generated_ulscript.h",
88 "src/internal/getonescriptspan.cc",
89 "src/internal/getonescriptspan.h",
90 "src/internal/integral_types.h",
91 "src/internal/lang_script.cc",
92 "src/internal/lang_script.h",
93 "src/internal/langspan.h",
94 "src/internal/offsetmap.cc",
95 "src/internal/offsetmap.h",
96 "src/internal/port.h",
97 "src/internal/scoreonescriptspan.cc",
98 "src/internal/scoreonescriptspan.h",
99 "src/internal/stringpiece.h",
100 "src/internal/tote.cc",
101 "src/internal/tote.h",
102 "src/internal/utf8prop_lettermarkscriptnum.h",
103 "src/internal/utf8repl_lettermarklower.h",
104 "src/internal/utf8scannot_lettermarkspecial.h",
105 "src/internal/utf8statetable.cc",
106 "src/internal/utf8statetable.h",
107 "src/public/compact_lang_det.h",
108 "src/public/encodings.h",
109 ]
110
65 include_dirs = [ 111 include_dirs = [
66 "src/internal", 112 "src/internal",
67 "src/public", 113 "src/public",
68 ] 114 ]
69 115
70 public_deps = [ 116 public_deps = [
71 ":cld2_data", 117 ":cld2_data",
72 ] 118 ]
73 configs -= [ "//build/config/compiler:chromium_code" ] 119 configs -= [ "//build/config/compiler:chromium_code" ]
74 configs += [ 120 configs += [
75 "//build/config/compiler:no_chromium_code", 121 "//build/config/compiler:no_chromium_code",
76 ":cld2_warnings", 122 ":cld2_warnings",
77 ] 123 ]
78 } 124 }
OLDNEW
« no previous file with comments | « third_party/cld/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698