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/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
9 | 9 |
10 assert(is_android) | 10 assert(is_android) |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 ":$_process_jar_target_name", | 1320 ":$_process_jar_target_name", |
1321 ] | 1321 ] |
1322 if (_supports_android) { | 1322 if (_supports_android) { |
1323 deps += [ ":$_dex_target_name" ] | 1323 deps += [ ":$_dex_target_name" ] |
1324 } | 1324 } |
1325 data_deps = [] | 1325 data_deps = [] |
1326 if (defined(invoker.data_deps)) { | 1326 if (defined(invoker.data_deps)) { |
1327 data_deps += invoker.data_deps | 1327 data_deps += invoker.data_deps |
1328 } | 1328 } |
1329 if (defined(invoker.main_class)) { | 1329 if (defined(invoker.main_class)) { |
1330 data_deps += [ ":$_binary_script_target_name" ] | 1330 # Some targets use the generated script while building, so make it a dep |
| 1331 # rather than a data_dep. |
| 1332 deps += [ ":$_binary_script_target_name" ] |
1331 } | 1333 } |
1332 } | 1334 } |
1333 } | 1335 } |
1334 | 1336 |
1335 # Compiles and jars a set of java files. | 1337 # Compiles and jars a set of java files. |
1336 # | 1338 # |
1337 # Outputs: | 1339 # Outputs: |
1338 # $jar_path.jar | 1340 # $jar_path.jar |
1339 # $jar_path.interface.jar | 1341 # $jar_path.interface.jar |
1340 # | 1342 # |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 "--use-ijars", | 1451 "--use-ijars", |
1450 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", | 1452 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", |
1451 "--jar-path=$_rebased_jar_path", | 1453 "--jar-path=$_rebased_jar_path", |
1452 "--java-srcjars=$_rebased_java_srcjars", | 1454 "--java-srcjars=$_rebased_java_srcjars", |
1453 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", | 1455 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", |
1454 "--jar-excluded-classes=$_jar_excluded_patterns", | 1456 "--jar-excluded-classes=$_jar_excluded_patterns", |
1455 ] | 1457 ] |
1456 if (_enable_incremental_javac) { | 1458 if (_enable_incremental_javac) { |
1457 args += [ "--incremental" ] | 1459 args += [ "--incremental" ] |
1458 deps += [ "//third_party/jmake" ] | 1460 deps += [ "//third_party/jmake" ] |
| 1461 inputs += [ "$root_out_dir/bin/jmake" ] |
1459 outputs += [ "${_javac_jar_path}.pdb" ] | 1462 outputs += [ "${_javac_jar_path}.pdb" ] |
1460 } | 1463 } |
1461 if (_supports_android) { | 1464 if (_supports_android) { |
1462 if (defined(invoker.alternative_android_sdk_ijar)) { | 1465 if (defined(invoker.alternative_android_sdk_ijar)) { |
1463 deps += [ invoker.alternative_android_sdk_ijar_dep ] | 1466 deps += [ invoker.alternative_android_sdk_ijar_dep ] |
1464 _android_sdk_ijar = invoker.alternative_android_sdk_ijar | 1467 _android_sdk_ijar = invoker.alternative_android_sdk_ijar |
1465 } else { | 1468 } else { |
1466 deps += [ "//build/android:android_ijar" ] | 1469 deps += [ "//build/android:android_ijar" ] |
1467 _android_sdk_ijar = "$root_out_dir/lib.java/android.interface.jar" | 1470 _android_sdk_ijar = "$root_out_dir/lib.java/android.interface.jar" |
1468 } | 1471 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 java_files = _java_files | 1689 java_files = _java_files |
1687 srcjar_deps = _srcjar_deps | 1690 srcjar_deps = _srcjar_deps |
1688 srcjars = _srcjars | 1691 srcjars = _srcjars |
1689 chromium_code = _chromium_code | 1692 chromium_code = _chromium_code |
1690 supports_android = _supports_android | 1693 supports_android = _supports_android |
1691 emma_instrument = _emma_instrument | 1694 emma_instrument = _emma_instrument |
1692 deps = build_config_deps | 1695 deps = build_config_deps |
1693 } | 1696 } |
1694 | 1697 |
1695 if (defined(invoker.main_class)) { | 1698 if (defined(invoker.main_class)) { |
1696 _final_datadeps += [ ":${_template_name}__java_binary_script" ] | 1699 # Targets might use the generated script while building, so make it a dep |
| 1700 # rather than a data_dep. |
| 1701 _final_deps += [ ":${_template_name}__java_binary_script" ] |
1697 java_binary_script("${_template_name}__java_binary_script") { | 1702 java_binary_script("${_template_name}__java_binary_script") { |
1698 forward_variables_from(invoker, | 1703 forward_variables_from(invoker, |
1699 [ | 1704 [ |
1700 "bootclasspath", | 1705 "bootclasspath", |
1701 "main_class", | 1706 "main_class", |
1702 "wrapper_script_args", | 1707 "wrapper_script_args", |
1703 ]) | 1708 ]) |
1704 build_config = _build_config | 1709 build_config = _build_config |
1705 jar_path = _jar_path | 1710 jar_path = _jar_path |
1706 script_name = _template_name | 1711 script_name = _template_name |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2159 ] | 2164 ] |
2160 args = [ | 2165 args = [ |
2161 "--depfile", | 2166 "--depfile", |
2162 rebase_path(depfile, root_build_dir), | 2167 rebase_path(depfile, root_build_dir), |
2163 "--script-output-path", | 2168 "--script-output-path", |
2164 rebase_path(generated_script, root_build_dir), | 2169 rebase_path(generated_script, root_build_dir), |
2165 ] | 2170 ] |
2166 args += test_runner_args | 2171 args += test_runner_args |
2167 } | 2172 } |
2168 } | 2173 } |
OLD | NEW |