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

Unified Diff: third_party/cld_2/BUILD.gn

Issue 461633002: Refactor language detection logic to allow non-static CLD data sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a factory for test harnesses and use it Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/cld_2/BUILD.gn
diff --git a/third_party/cld_2/BUILD.gn b/third_party/cld_2/BUILD.gn
index 61f337846ead79ec9a75f9f1d903e9c9f8c5bb07..af04535fc928aa6455032a539c7c7ed9a7ed7219 100644
--- a/third_party/cld_2/BUILD.gn
+++ b/third_party/cld_2/BUILD.gn
@@ -88,14 +88,16 @@ source_set("cld2_data") {
}
}
-static_library("cld2_static") {
+# As in the corresponding gyp file, this just builds the core interfaces for
+# CLD2. You must still declare a dependency on a specific data set, either
+# cld2_dynamic or cld2_static.
+static_library("cld_2") {
sources = core_files
include_dirs = [
"src/internal",
"src/public",
]
- deps = [ ":cld2_data" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
@@ -104,13 +106,19 @@ static_library("cld2_static") {
}
}
-# Meta-target for convenience; dependents don't need to know if this if CLD2
-# is in dynamic or static configuration.
-group("cld_2") {
- if (cld2_data_source == "static") {
- deps = [ ":cld2_static" ]
- } else {
- deps = [ ":cld2_dynamic" ]
+static_library("cld2_static") {
+ sources = core_files
+ include_dirs = [
+ "src/internal",
+ "src/public",
+ ]
+
+ deps = [ ":cld2_data" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ if (is_win) {
+ cflags = [ "/wd4267" ] # size_t -> int conversion.
}
}
@@ -120,14 +128,13 @@ config("cld2_dynamic_mode_config") {
static_library("cld2_dynamic") {
sources = core_files + data_loader_files
- all_dependent_configs = [ ":cld2_dynamic_mode_config" ]
include_dirs = [
"src/internal",
"src/public",
]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config" ]
if (is_win) {
cflags = [ "/wd4267" ] # size_t -> int conversion.
@@ -151,7 +158,7 @@ if (!is_win) {
deps = [ ":cld2_data", ":cld2_dynamic" ]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code", ":cld2_dynamic_mode_config" ]
if (is_win) {
cflags = [ "/wd4267" ] # size_t -> int conversion.

Powered by Google App Engine
This is Rietveld 408576698