Commit 13cff726 authored by abakalov's avatar abakalov Committed by Commit bot

Switching from CLD3 to CLD2

This is accomplished by:
- flipping the flag in third_party/cld/BUILD.gn
- listing explicitly source files in third_party/cld_2/BUILD.gn that
were originally retrieved from the following gyp file which got
removed during the transition away from GYP:
https://chromium.googlesource.com/chromium/src/+/4b56905d6ab61e9e14f991a7458d8968635cfef2/third_party/cld_2/cld_2.gyp

BUG=653881

Review-Url: https://codereview.chromium.org/2396183002
Cr-Commit-Position: refs/heads/master@{#423855}
parent 32a96b17
......@@ -5,7 +5,7 @@
import("//build/buildflag_header.gni")
# Specifies which language identification model to use: CLD2 or CLD3.
cld_version = 3
cld_version = 2
buildflag_header("cld_version") {
header = "cld_version.h"
......
......@@ -12,11 +12,6 @@ declare_args() {
}
}
gypi_values = exec_script("//build/gypi_to_gn.py",
[ rebase_path("cld_2.gyp") ],
"scope",
[ "cld_2.gyp" ])
config("cld2_data_warnings") {
visibility = [ ":*" ]
if (is_clang) {
......@@ -26,11 +21,20 @@ config("cld2_data_warnings") {
}
static_library("cld2_data") {
sources = gypi_values.cld2_data_sources
sources = [
"src/internal/cld2_generated_cjk_compatible.cc",
"src/internal/cld2_generated_deltaoctachrome.cc",
"src/internal/cld2_generated_distinctoctachrome.cc",
"src/internal/cld_generated_cjk_delta_bi_4.cc",
"src/internal/cld_generated_cjk_uni_prop_80.cc",
"src/internal/cld_generated_score_quad_octa_2.cc",
"src/internal/generated_distinct_bi_0.cc",
]
if (cld2_table_size == 0) {
sources += gypi_values.cld2_data_smallest_sources
sources += [ "src/internal/cld2_generated_quadchrome_16.cc" ]
} else if (cld2_table_size == 2) {
sources += gypi_values.cld2_data_largest_sources
sources += [ "src/internal/cld2_generated_quadchrome_2.cc" ]
}
include_dirs = [
......@@ -61,7 +65,49 @@ config("cld2_warnings") {
}
static_library("cld_2") {
sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources
sources = [
"src/internal/cld2tablesummary.h",
"src/internal/cldutil.cc",
"src/internal/cldutil.h",
"src/internal/cldutil_shared.cc",
"src/internal/cldutil_shared.h",
"src/internal/compact_lang_det.cc",
"src/internal/compact_lang_det_hint_code.cc",
"src/internal/compact_lang_det_hint_code.h",
"src/internal/compact_lang_det_impl.cc",
"src/internal/compact_lang_det_impl.h",
"src/internal/debug.h",
"src/internal/debug_empty.cc",
"src/internal/fixunicodevalue.cc",
"src/internal/fixunicodevalue.h",
"src/internal/generated_entities.cc",
"src/internal/generated_language.cc",
"src/internal/generated_language.h",
"src/internal/generated_ulscript.cc",
"src/internal/generated_ulscript.h",
"src/internal/getonescriptspan.cc",
"src/internal/getonescriptspan.h",
"src/internal/integral_types.h",
"src/internal/lang_script.cc",
"src/internal/lang_script.h",
"src/internal/langspan.h",
"src/internal/offsetmap.cc",
"src/internal/offsetmap.h",
"src/internal/port.h",
"src/internal/scoreonescriptspan.cc",
"src/internal/scoreonescriptspan.h",
"src/internal/stringpiece.h",
"src/internal/tote.cc",
"src/internal/tote.h",
"src/internal/utf8prop_lettermarkscriptnum.h",
"src/internal/utf8repl_lettermarklower.h",
"src/internal/utf8scannot_lettermarkspecial.h",
"src/internal/utf8statetable.cc",
"src/internal/utf8statetable.h",
"src/public/compact_lang_det.h",
"src/public/encodings.h",
]
include_dirs = [
"src/internal",
"src/public",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment