| Index: third_party/cld/BUILD.gn | 
| diff --git a/third_party/cld/BUILD.gn b/third_party/cld/BUILD.gn | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..d3b57746ebc3da924b26e8d7bd1d2f75f985daa7 | 
| --- /dev/null | 
| +++ b/third_party/cld/BUILD.gn | 
| @@ -0,0 +1,111 @@ | 
| +# Copyright 2014 The Chromium Authors. All rights reserved. | 
| +# Use of this source code is governed by a BSD-style license that can be | 
| +# found in the LICENSE file. | 
| + | 
| +config("cld_config") { | 
| +  defines = [ "CLD_WINDOWS" ] | 
| +  include_dirs = [ "." ] | 
| +} | 
| + | 
| +static_library("cld") { | 
| +  sources = [ | 
| +    "encodings/compact_lang_det/cldutil.cc", | 
| +    "encodings/compact_lang_det/cldutil.h", | 
| +    "encodings/compact_lang_det/cldutil_dbg.h", | 
| +    "encodings/compact_lang_det/cldutil_dbg_empty.cc", | 
| +    "encodings/compact_lang_det/compact_lang_det.cc", | 
| +    "encodings/compact_lang_det/compact_lang_det.h", | 
| +    "encodings/compact_lang_det/compact_lang_det_impl.cc", | 
| +    "encodings/compact_lang_det/compact_lang_det_impl.h", | 
| +    "encodings/compact_lang_det/ext_lang_enc.cc", | 
| +    "encodings/compact_lang_det/ext_lang_enc.h", | 
| +    "encodings/compact_lang_det/getonescriptspan.cc", | 
| +    "encodings/compact_lang_det/getonescriptspan.h", | 
| +    "encodings/compact_lang_det/letterscript_enum.cc", | 
| +    "encodings/compact_lang_det/letterscript_enum.h", | 
| +    "encodings/compact_lang_det/string_byte_sink.cc", | 
| +    "encodings/compact_lang_det/string_byte_sink.h", | 
| +    "encodings/compact_lang_det/subsetsequence.cc", | 
| +    "encodings/compact_lang_det/subsetsequence.h", | 
| +    "encodings/compact_lang_det/tote.cc", | 
| +    "encodings/compact_lang_det/tote.h", | 
| +    "encodings/compact_lang_det/utf8propjustletter.h", | 
| +    "encodings/compact_lang_det/utf8propletterscriptnum.h", | 
| +    "encodings/compact_lang_det/utf8scannotjustletterspecial.h", | 
| +    "encodings/compact_lang_det/generated/cld_generated_score_quadchrome_0406.cc", | 
| +    "encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc", | 
| +    "encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc", | 
| +    "encodings/compact_lang_det/generated/compact_lang_det_generated_deltaoctachrome.cc", | 
| +    "encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h", | 
| +    "encodings/compact_lang_det/generated/compact_lang_det_generated_quadschrome.cc", | 
| +    "encodings/compact_lang_det/win/cld_basictypes.h", | 
| +    "encodings/compact_lang_det/win/cld_commandlineflags.h", | 
| +    "encodings/compact_lang_det/win/cld_google.h", | 
| +    "encodings/compact_lang_det/win/cld_htmlutils.h", | 
| +    "encodings/compact_lang_det/win/cld_htmlutils_windows.cc", | 
| +    "encodings/compact_lang_det/win/cld_logging.h", | 
| +    "encodings/compact_lang_det/win/cld_macros.h", | 
| +    "encodings/compact_lang_det/win/cld_strtoint.h", | 
| +    "encodings/compact_lang_det/win/cld_unicodetext.cc", | 
| +    "encodings/compact_lang_det/win/cld_unicodetext.h", | 
| +    "encodings/compact_lang_det/win/cld_unilib.h", | 
| +    "encodings/compact_lang_det/win/cld_unilib_windows.cc", | 
| +    "encodings/compact_lang_det/win/cld_utf.h", | 
| +    "encodings/compact_lang_det/win/cld_utf8statetable.cc", | 
| +    "encodings/compact_lang_det/win/cld_utf8statetable.h", | 
| +    "encodings/compact_lang_det/win/cld_utf8utils.h", | 
| +    "encodings/compact_lang_det/win/cld_utf8utils_windows.cc", | 
| +    "encodings/internal/encodings.cc", | 
| +    "encodings/proto/encodings.pb.h", | 
| +    "encodings/public/encodings.h", | 
| +    "languages/internal/languages.cc", | 
| +    "languages/proto/languages.pb.h", | 
| +    "languages/public/languages.h", | 
| +    "base/basictypes.h", | 
| +    "base/build_config.h", | 
| +    "base/casts.h", | 
| +    "base/commandlineflags.h", | 
| +    "base/global_strip_options.h", | 
| +    "base/logging.h", | 
| +    "base/macros.h", | 
| +    "base/port.h", | 
| +    "base/crash.h", | 
| +    "base/dynamic_annotations.h", | 
| +    "base/scoped_ptr.h", | 
| +    "base/stl_decl_msvc.h", | 
| +    "base/log_severity.h", | 
| +    "base/strtoint.h", | 
| +    "base/vlog_is_on.h", | 
| +    "base/string_util.h", | 
| +    "base/type_traits.h", | 
| +    "base/template_util.h", | 
| +  ] | 
| + | 
| +  configs -= [ | 
| +    # We have conflicting versions of some base files. | 
| +    "//build/config/compiler:default_include_dirs", | 
| +    "//build/config/compiler:chromium_code", | 
| +  ] | 
| +  configs += [ "//build/config/compiler:no_chromium_code" ] | 
| +  direct_dependent_configs = [ ":cld_config" ] | 
| + | 
| +  if (is_win) { | 
| +    defines = [ "COMPILER_MSVC" ] | 
| +    cflags = [ | 
| +      "/wd4005",  # Macro defined twice. | 
| +      "/wd4006",  # #undef expected an identifier. | 
| +      "/wd4309",  # Truncation of constant value. | 
| +      "/wd4267",  # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int | 
| +    ] | 
| +  } else { | 
| +    defines = [ "COMPILER_GCC" ] | 
| +  } | 
| + | 
| +  deps = [ | 
| +    "//third_party/icu:icuuc", | 
| +  ] | 
| + | 
| +  forward_dependent_configs_from = [ | 
| +    "//third_party/icu:icuuc", | 
| +  ] | 
| +} | 
|  |