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
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
7 # May need to make this a build arg.
10 static_library("cld_2") {
12 "src/internal/cld2tablesummary.h",
13 "src/internal/cldutil.cc",
14 "src/internal/cldutil.h",
15 "src/internal/cldutil_shared.cc",
16 "src/internal/cldutil_shared.h",
17 "src/internal/compact_lang_det.cc",
18 "src/internal/compact_lang_det_hint_code.cc",
19 "src/internal/compact_lang_det_hint_code.h",
20 "src/internal/compact_lang_det_impl.cc",
21 "src/internal/compact_lang_det_impl.h",
22 "src/internal/debug.h",
23 "src/internal/debug_empty.cc",
24 "src/internal/fixunicodevalue.cc",
25 "src/internal/fixunicodevalue.h",
26 "src/internal/generated_distinct_bi_0.cc",
27 "src/internal/generated_entities.cc",
28 "src/internal/generated_language.cc",
29 "src/internal/generated_language.h",
30 "src/internal/generated_ulscript.cc",
31 "src/internal/generated_ulscript.h",
32 "src/internal/getonescriptspan.cc",
33 "src/internal/getonescriptspan.h",
34 "src/internal/integral_types.h",
35 "src/internal/lang_script.cc",
36 "src/internal/lang_script.h",
37 "src/internal/langspan.h",
38 "src/internal/offsetmap.cc",
39 "src/internal/offsetmap.h",
40 "src/internal/port.h",
41 "src/internal/scoreonescriptspan.cc",
42 "src/internal/scoreonescriptspan.h",
43 "src/internal/stringpiece.h",
44 "src/internal/tote.cc",
45 "src/internal/tote.h",
46 "src/internal/utf8prop_lettermarkscriptnum.h",
47 "src/internal/utf8repl_lettermarklower.h",
48 "src/internal/utf8scannot_lettermarkspecial.h",
49 "src/internal/utf8statetable.cc",
50 "src/internal/utf8statetable.h",
51 "src/public/compact_lang_det.h",
52 "src/public/encodings.h",
60 configs -= [ "//build/config/compiler:chromium_code" ]
61 configs += [ "//build/config/compiler:no_chromium_code" ]
64 cflags = [ "/wd4267" ] # size_t -> int conversion.
66 if (cld2_data_source != "static") {
67 assert(false, "Non-static mode isn't implemented, implement me")
71 executable("cld_2_dynamic_data_tool") {
73 "src/internal/cld2_dynamic_data.h",
74 "src/internal/cld2_dynamic_data.cc",
75 "src/internal/cld2_dynamic_data_extractor.h",
76 "src/internal/cld2_dynamic_data_extractor.cc",
77 "src/internal/cld2_dynamic_data_loader.h",
78 "src/internal/cld2_dynamic_data_loader.cc",
79 "src/internal/cld2_dynamic_data_tool.cc",
80 "src/internal/cld2_generated_cjk_compatible.cc",
81 "src/internal/cld2_generated_deltaoctachrome0122.cc",
82 "src/internal/cld2_generated_distinctoctachrome0122.cc",
83 "src/internal/cld2tablesummary.h",
84 "src/internal/cld_generated_cjk_delta_bi_4.cc",
85 "src/internal/cld_generated_cjk_uni_prop_80.cc",
86 "src/internal/cld_generated_score_quad_octa_0122_2.cc",
87 "src/internal/cldutil.cc",
88 "src/internal/cldutil.h",
89 "src/internal/cldutil_shared.cc",
90 "src/internal/cldutil_shared.h",
91 "src/internal/compact_lang_det.cc",
92 "src/internal/compact_lang_det_hint_code.cc",
93 "src/internal/compact_lang_det_hint_code.h",
94 "src/internal/compact_lang_det_impl.cc",
95 "src/internal/compact_lang_det_impl.h",
96 "src/internal/debug.h",
97 "src/internal/debug_empty.cc",
98 "src/internal/fixunicodevalue.cc",
99 "src/internal/fixunicodevalue.h",
100 "src/internal/generated_distinct_bi_0.cc",
101 "src/internal/generated_entities.cc",
102 "src/internal/generated_language.cc",
103 "src/internal/generated_language.h",
104 "src/internal/generated_ulscript.cc",
105 "src/internal/generated_ulscript.h",
106 "src/internal/getonescriptspan.cc",
107 "src/internal/getonescriptspan.h",
108 "src/internal/integral_types.h",
109 "src/internal/lang_script.cc",
110 "src/internal/lang_script.h",
111 "src/internal/langspan.h",
112 "src/internal/offsetmap.cc",
113 "src/internal/offsetmap.h",
114 "src/internal/port.h",
115 "src/internal/scoreonescriptspan.cc",
116 "src/internal/scoreonescriptspan.h",
117 "src/internal/stringpiece.h",
118 "src/internal/tote.cc",
119 "src/internal/tote.h",
120 "src/internal/utf8prop_lettermarkscriptnum.h",
121 "src/internal/utf8repl_lettermarklower.h",
122 "src/internal/utf8scannot_lettermarkspecial.h",
123 "src/internal/utf8statetable.cc",
124 "src/internal/utf8statetable.h",
125 "src/public/compact_lang_det.h",
126 "src/public/encodings.h",
134 configs -= [ "//build/config/compiler:chromium_code" ]
135 configs += [ "//build/config/compiler:no_chromium_code" ]
138 cflags = [ "/wd4267" ] # size_t -> int conversion.
140 if (cld2_table_size == 0) {
141 sources += [ "src/internal/cld2_generated_quadchrome0122_16.cc" ]
142 } else if (cld2_table_size == 1) {
143 sources += [ "src/internal/cld2_generated_quadchrome0122_19.cc" ]
144 } else if (cld2_table_size == 2) {
145 sources += [ "src/internal/cld2_generated_quadchrome0122_2.cc" ]