Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 gypi_values = exec_script("//build/gypi_to_gn.py", | 7 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 8 [ rebase_path("cld_2.gyp") ], | 8 [ rebase_path("cld_2.gyp") ], |
| 9 "scope", | 9 "scope", |
| 10 [ "cld_2.gyp" ]) | 10 [ "cld_2.gyp" ]) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 | 73 |
| 74 source_set("cld2_platform_impl") { | 74 source_set("cld2_platform_impl") { |
| 75 deps = [] | 75 deps = [] |
| 76 if (cld2_platform_support == "static") { | 76 if (cld2_platform_support == "static") { |
| 77 deps += [ ":cld2_static" ] | 77 deps += [ ":cld2_static" ] |
| 78 } else if (cld2_platform_support == "dynamic") { | 78 } else if (cld2_platform_support == "dynamic") { |
| 79 deps += [ ":cld2_dynamic" ] | 79 deps += [ ":cld2_dynamic" ] |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 config("cld2_warnings") { | |
| 84 if (is_clang) { | |
| 85 cflags = [ | |
| 86 # cld_2 has unused private fields. | |
| 87 "-Wno-unused-private-field", | |
| 88 ] | |
| 89 } | |
| 90 } | |
| 91 | |
| 83 static_library("cld2_static") { | 92 static_library("cld2_static") { |
| 84 sources = gypi_values.cld2_core_impl_sources | 93 sources = gypi_values.cld2_core_impl_sources |
| 85 include_dirs = [ | 94 include_dirs = [ |
| 86 "src/internal", | 95 "src/internal", |
| 87 "src/public", | 96 "src/public", |
| 88 ] | 97 ] |
| 89 | 98 |
| 90 deps = [ | 99 deps = [ |
| 91 ":cld_2", | 100 ":cld_2", |
| 92 ":cld2_data", | 101 ":cld2_data", |
| 93 ] | 102 ] |
| 94 configs -= [ "//build/config/compiler:chromium_code" ] | 103 configs -= [ "//build/config/compiler:chromium_code" ] |
| 95 configs += [ "//build/config/compiler:no_chromium_code" ] | 104 configs += [ |
| 105 "//build/config/compiler:no_chromium_code", | |
| 106 ":cld2_warnings", | |
|
brettw
2015/07/09 18:03:07
This should go first.
Nico
2015/07/09 18:18:46
No, it needs be be after no_chromium_code so that
| |
| 107 ] | |
| 96 } | 108 } |
| 97 | 109 |
| 98 config("cld2_dynamic_mode_config") { | 110 config("cld2_dynamic_mode_config") { |
| 99 defines = [ "CLD2_DYNAMIC_MODE" ] | 111 defines = [ "CLD2_DYNAMIC_MODE" ] |
| 100 } | 112 } |
| 101 | 113 |
| 102 static_library("cld2_dynamic") { | 114 static_library("cld2_dynamic") { |
| 103 sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources + | 115 sources = gypi_values.cld2_core_sources + gypi_values.cld2_core_impl_sources + |
| 104 gypi_values.cld2_dynamic_data_loader_sources | 116 gypi_values.cld2_dynamic_data_loader_sources |
| 105 include_dirs = [ | 117 include_dirs = [ |
| 106 "src/internal", | 118 "src/internal", |
| 107 "src/public", | 119 "src/public", |
| 108 ] | 120 ] |
| 109 | 121 |
| 110 configs -= [ "//build/config/compiler:chromium_code" ] | 122 configs -= [ "//build/config/compiler:chromium_code" ] |
| 111 configs += [ | 123 configs += [ |
| 112 ":cld2_dynamic_mode_config", | 124 ":cld2_dynamic_mode_config", |
| 113 "//build/config/compiler:no_chromium_code", | 125 "//build/config/compiler:no_chromium_code", |
| 126 ":cld2_warnings", | |
|
brettw
2015/07/09 18:03:07
Ditto
Nico
2015/07/09 18:18:46
Ditto.
| |
| 114 ] | 127 ] |
| 115 } | 128 } |
| 116 | 129 |
| 117 # Does not build on Windows. | 130 # Does not build on Windows. |
| 118 if (!is_win) { | 131 if (!is_win) { |
| 119 executable("cld_2_dynamic_data_tool") { | 132 executable("cld_2_dynamic_data_tool") { |
| 120 sources = [ | 133 sources = [ |
| 121 "src/internal/cld2_dynamic_data_extractor.cc", | 134 "src/internal/cld2_dynamic_data_extractor.cc", |
| 122 "src/internal/cld2_dynamic_data_extractor.h", | 135 "src/internal/cld2_dynamic_data_extractor.h", |
| 123 "src/internal/cld2_dynamic_data_tool.cc", | 136 "src/internal/cld2_dynamic_data_tool.cc", |
| 124 ] | 137 ] |
| 125 | 138 |
| 126 include_dirs = [ | 139 include_dirs = [ |
| 127 "src/internal", | 140 "src/internal", |
| 128 "src/public", | 141 "src/public", |
| 129 ] | 142 ] |
| 130 | 143 |
| 131 deps = [ | 144 deps = [ |
| 132 ":cld2_data", | 145 ":cld2_data", |
| 133 ":cld2_dynamic", | 146 ":cld2_dynamic", |
| 134 ] | 147 ] |
| 135 | 148 |
| 136 configs -= [ "//build/config/compiler:chromium_code" ] | 149 configs -= [ "//build/config/compiler:chromium_code" ] |
| 137 configs += [ | 150 configs += [ |
| 138 ":cld2_dynamic_mode_config", | 151 ":cld2_dynamic_mode_config", |
| 139 "//build/config/compiler:no_chromium_code", | 152 "//build/config/compiler:no_chromium_code", |
| 140 ] | 153 ] |
| 141 } | 154 } |
| 142 } | 155 } |
| OLD | NEW |