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/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/zip.gni") | 6 import("//build/config/zip.gni") |
| 7 import("//third_party/ijar/ijar.gni") | 7 import("//third_party/ijar/ijar.gni") |
| 8 | 8 |
| 9 assert(is_android) | 9 assert(is_android) |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 "--bootclasspath", | 216 "--bootclasspath", |
| 217 invoker.bootclasspath, | 217 invoker.bootclasspath, |
| 218 ] | 218 ] |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 template("dex") { | 223 template("dex") { |
| 224 set_sources_assignment_filter([]) | 224 set_sources_assignment_filter([]) |
| 225 | 225 |
| 226 _multidex = defined(invoker.multidex) && invoker.multidex | |
|
agrieve
2015/11/16 19:02:33
nit: It would be more GN'y to call this "enable_mu
jbudorick
2015/11/16 20:45:56
I'm still getting a handle on what's GN'y. switche
| |
| 227 | |
| 228 if (_multidex) { | |
| 229 _main_dex_list_path = invoker.output + ".main_dex_list" | |
| 230 template("main_dex_list_helper") { | |
|
agrieve
2015/11/16 19:02:33
doesn't look like this is used more than once, so
jbudorick
2015/11/16 20:45:56
I'm not. I think I patterned this off of something
| |
| 231 action(target_name) { | |
| 232 forward_variables_from(invoker, | |
| 233 [ | |
| 234 "deps", | |
| 235 "inputs", | |
| 236 "sources", | |
| 237 "testonly", | |
| 238 ]) | |
| 239 | |
| 240 script = "//build/android/gyp/main_dex_list.py" | |
| 241 depfile = "$target_gen_dir/$target_name.d" | |
| 242 | |
| 243 main_dex_rules = "//build/android/main_dex_classes.flags" | |
| 244 | |
| 245 outputs = [ | |
| 246 depfile, | |
| 247 invoker.output, | |
| 248 ] | |
| 249 | |
| 250 args = [ | |
| 251 "--depfile", | |
| 252 rebase_path(depfile, root_build_dir), | |
| 253 "--android-sdk-tools", | |
| 254 rebased_android_sdk_build_tools, | |
| 255 "--main-dex-list-path", | |
| 256 rebase_path(invoker.output, root_build_dir), | |
| 257 "--main-dex-rules-path", | |
| 258 rebase_path(main_dex_rules, root_build_dir), | |
| 259 ] | |
| 260 | |
| 261 if (defined(invoker.args)) { | |
| 262 args += invoker.args | |
| 263 } | |
| 264 | |
| 265 if (defined(invoker.sources)) { | |
| 266 args += rebase_path(invoker.sources, root_build_dir) | |
| 267 } | |
| 268 } | |
| 269 } | |
| 270 | |
| 271 _main_dex_list_target_name = "${target_name}__main_dex_list" | |
| 272 main_dex_list_helper(_main_dex_list_target_name) { | |
| 273 forward_variables_from(invoker, | |
| 274 [ | |
| 275 "args", | |
| 276 "sources", | |
| 277 ]) | |
| 278 output = _main_dex_list_path | |
| 279 deps = invoker.deps | |
| 280 } | |
| 281 } | |
| 282 | |
| 226 assert(defined(invoker.output)) | 283 assert(defined(invoker.output)) |
| 227 action(target_name) { | 284 action(target_name) { |
| 228 forward_variables_from(invoker, | 285 forward_variables_from(invoker, |
| 229 [ | 286 [ |
| 230 "deps", | 287 "deps", |
| 231 "inputs", | 288 "inputs", |
| 232 "sources", | 289 "sources", |
| 233 "testonly", | 290 "testonly", |
| 234 ]) | 291 ]) |
| 235 script = "//build/android/gyp/dex.py" | 292 script = "//build/android/gyp/dex.py" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 251 ] | 308 ] |
| 252 | 309 |
| 253 if (enable_incremental_dx) { | 310 if (enable_incremental_dx) { |
| 254 args += [ "--incremental" ] | 311 args += [ "--incremental" ] |
| 255 } | 312 } |
| 256 | 313 |
| 257 if (defined(invoker.no_locals) && invoker.no_locals) { | 314 if (defined(invoker.no_locals) && invoker.no_locals) { |
| 258 args += [ "--no-locals=1" ] | 315 args += [ "--no-locals=1" ] |
| 259 } | 316 } |
| 260 | 317 |
| 318 if (defined(invoker.multidex) && invoker.multidex) { | |
| 319 args += [ | |
| 320 "--multi-dex", | |
| 321 "--main-dex-list-path", | |
| 322 rebase_path(_main_dex_list_path, root_build_dir), | |
| 323 ] | |
| 324 deps += [ ":${_main_dex_list_target_name}" ] | |
| 325 inputs += [ _main_dex_list_path ] | |
| 326 } | |
| 327 | |
| 261 if (defined(invoker.args)) { | 328 if (defined(invoker.args)) { |
| 262 args += invoker.args | 329 args += invoker.args |
| 263 } | 330 } |
| 264 | 331 |
| 265 if (defined(invoker.sources)) { | 332 if (defined(invoker.sources)) { |
| 266 args += rebase_path(invoker.sources, root_build_dir) | 333 args += rebase_path(invoker.sources, root_build_dir) |
| 267 } | 334 } |
| 268 } | 335 } |
| 269 } | 336 } |
| 270 | 337 |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1783 ] | 1850 ] |
| 1784 args = [ | 1851 args = [ |
| 1785 "--depfile", | 1852 "--depfile", |
| 1786 rebase_path(depfile, root_build_dir), | 1853 rebase_path(depfile, root_build_dir), |
| 1787 "--script-output-path", | 1854 "--script-output-path", |
| 1788 rebase_path(generated_script, root_build_dir), | 1855 rebase_path(generated_script, root_build_dir), |
| 1789 ] | 1856 ] |
| 1790 args += test_runner_args | 1857 args += test_runner_args |
| 1791 } | 1858 } |
| 1792 } | 1859 } |
| OLD | NEW |