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

Side by Side Diff: build/config/android/internal_rules.gni

Issue 2318673003: Revert of GN(Android): Stop specifying depfile under outputs (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « android_webview/BUILD.gn ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_overrides/build.gni") 5 import("//build_overrides/build.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/sanitizers/sanitizers.gni") 7 import("//build/config/sanitizers/sanitizers.gni")
8 8
9 assert(is_android) 9 assert(is_android)
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 _deps_configs += [ "$_dep_gen_dir/$_dep_name.build_config" ] 144 _deps_configs += [ "$_dep_gen_dir/$_dep_name.build_config" ]
145 } 145 }
146 } 146 }
147 sources = [] 147 sources = []
148 } 148 }
149 set_sources_assignment_filter([]) 149 set_sources_assignment_filter([])
150 } 150 }
151 _rebased_deps_configs = rebase_path(_deps_configs, root_build_dir) 151 _rebased_deps_configs = rebase_path(_deps_configs, root_build_dir)
152 152
153 outputs = [ 153 outputs = [
154 depfile,
154 build_config, 155 build_config,
155 ] 156 ]
156 157
157 args = [ 158 args = [
158 "--type", 159 "--type",
159 type, 160 type,
160 "--depfile", 161 "--depfile",
161 rebase_path(depfile, root_build_dir), 162 rebase_path(depfile, root_build_dir),
162 "--deps-configs=$_rebased_deps_configs", 163 "--deps-configs=$_rebased_deps_configs",
163 "--build-config", 164 "--build-config",
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 "deps", 379 "deps",
379 "inputs", 380 "inputs",
380 "sources", 381 "sources",
381 "testonly", 382 "testonly",
382 "visibility", 383 "visibility",
383 ]) 384 ])
384 if (!defined(sources)) { 385 if (!defined(sources)) {
385 sources = [] 386 sources = []
386 } 387 }
387 script = "//build/android/gyp/copy_ex.py" 388 script = "//build/android/gyp/copy_ex.py"
389
388 depfile = "$target_gen_dir/$target_name.d" 390 depfile = "$target_gen_dir/$target_name.d"
389
390 _stamp_file = "$target_gen_dir/$target_name.stamp"
391 outputs = [ 391 outputs = [
392 _stamp_file, 392 depfile,
393 ] 393 ]
394 394
395 args = [ 395 args = [
396 "--depfile", 396 "--depfile",
397 rebase_path(depfile, root_build_dir), 397 rebase_path(depfile, root_build_dir),
398 "--stamp",
399 rebase_path(_stamp_file, root_build_dir),
400 "--dest", 398 "--dest",
401 rebase_path(invoker.dest, root_build_dir), 399 rebase_path(invoker.dest, root_build_dir),
402 ] 400 ]
403 rebased_sources = rebase_path(sources, root_build_dir) 401 rebased_sources = rebase_path(sources, root_build_dir)
404 args += [ "--files=$rebased_sources" ] 402 args += [ "--files=$rebased_sources" ]
405 403
406 if (defined(invoker.clear_dir) && invoker.clear_dir) { 404 if (defined(invoker.clear_dir) && invoker.clear_dir) {
407 args += [ "--clear" ] 405 args += [ "--clear" ]
408 } 406 }
409 407
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 ] 603 ]
606 } 604 }
607 test_runner_args += [ "--fast-local-dev" ] 605 test_runner_args += [ "--fast-local-dev" ]
608 } 606 }
609 if (is_asan) { 607 if (is_asan) {
610 test_runner_args += [ "--tool=asan" ] 608 test_runner_args += [ "--tool=asan" ]
611 } 609 }
612 610
613 generated_script = "$root_build_dir/bin/run_${_test_name}" 611 generated_script = "$root_build_dir/bin/run_${_test_name}"
614 outputs = [ 612 outputs = [
613 depfile,
615 generated_script, 614 generated_script,
616 ] 615 ]
617 data += [ generated_script ] 616 data += [ generated_script ]
618 617
619 args = [ 618 args = [
620 "--depfile", 619 "--depfile",
621 rebase_path(depfile, root_build_dir), 620 rebase_path(depfile, root_build_dir),
622 "--script-output-path", 621 "--script-output-path",
623 rebase_path(generated_script, root_build_dir), 622 rebase_path(generated_script, root_build_dir),
624 ] 623 ]
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 670
672 script = "//build/android/gyp/lint.py" 671 script = "//build/android/gyp/lint.py"
673 depfile = "$target_gen_dir/$target_name.d" 672 depfile = "$target_gen_dir/$target_name.d"
674 inputs = [ 673 inputs = [
675 _platform_xml_path, 674 _platform_xml_path,
676 _suppressions_file, 675 _suppressions_file,
677 invoker.android_manifest, 676 invoker.android_manifest,
678 ] 677 ]
679 678
680 outputs = [ 679 outputs = [
680 depfile,
681 _config_path, 681 _config_path,
682 _result_path, 682 _result_path,
683 ] 683 ]
684 684
685 args = [ 685 args = [
686 "--lint-path=$_rebased_lint_android_sdk_root/tools/lint", 686 "--lint-path=$_rebased_lint_android_sdk_root/tools/lint",
687 "--cache-dir", 687 "--cache-dir",
688 rebase_path(_cache_dir, root_build_dir), 688 rebase_path(_cache_dir, root_build_dir),
689 "--platform-xml-path", 689 "--platform-xml-path",
690 rebase_path(_platform_xml_path, root_build_dir), 690 rebase_path(_platform_xml_path, root_build_dir),
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 rebase_path(invoker.alternative_android_sdk_jar) 762 rebase_path(invoker.alternative_android_sdk_jar)
763 } else { 763 } else {
764 inputs += [ android_sdk_jar ] 764 inputs += [ android_sdk_jar ]
765 _rebased_android_sdk_jar = rebased_android_sdk_jar 765 _rebased_android_sdk_jar = rebased_android_sdk_jar
766 } 766 }
767 if (defined(invoker.inputs)) { 767 if (defined(invoker.inputs)) {
768 inputs += invoker.inputs 768 inputs += invoker.inputs
769 } 769 }
770 depfile = "${target_gen_dir}/${target_name}.d" 770 depfile = "${target_gen_dir}/${target_name}.d"
771 outputs = [ 771 outputs = [
772 depfile,
772 _output_jar_path, 773 _output_jar_path,
773 "$_output_jar_path.dump", 774 "$_output_jar_path.dump",
774 "$_output_jar_path.seeds", 775 "$_output_jar_path.seeds",
775 "$_output_jar_path.mapping", 776 "$_output_jar_path.mapping",
776 "$_output_jar_path.usage", 777 "$_output_jar_path.usage",
777 ] 778 ]
778 args = [ 779 args = [
779 "--depfile", 780 "--depfile",
780 rebase_path(depfile, root_build_dir), 781 rebase_path(depfile, root_build_dir),
781 "--proguard-path", 782 "--proguard-path",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) 815 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
815 816
816 inputs = [ 817 inputs = [
817 "//build/android/pylib/utils/findbugs.py", 818 "//build/android/pylib/utils/findbugs.py",
818 _exclusions_file, 819 _exclusions_file,
819 invoker.jar_path, 820 invoker.jar_path,
820 invoker.build_config, 821 invoker.build_config,
821 ] 822 ]
822 823
823 outputs = [ 824 outputs = [
825 depfile,
824 _result_path, 826 _result_path,
825 ] 827 ]
826 828
827 args = [ 829 args = [
828 "--depfile", 830 "--depfile",
829 rebase_path(depfile, root_build_dir), 831 rebase_path(depfile, root_build_dir),
830 "--exclude", 832 "--exclude",
831 rebase_path(_exclusions_file, root_build_dir), 833 rebase_path(_exclusions_file, root_build_dir),
832 "--auxclasspath-gyp", 834 "--auxclasspath-gyp",
833 "@FileArg($_rebased_build_config:javac:classpath)", 835 "@FileArg($_rebased_build_config:javac:classpath)",
(...skipping 27 matching lines...) Expand all
861 _script_name = invoker.script_name 863 _script_name = invoker.script_name
862 864
863 action(target_name) { 865 action(target_name) {
864 script = "//build/android/gyp/create_java_binary_script.py" 866 script = "//build/android/gyp/create_java_binary_script.py"
865 depfile = "$target_gen_dir/$_script_name.d" 867 depfile = "$target_gen_dir/$_script_name.d"
866 java_script = "$root_build_dir/bin/$_script_name" 868 java_script = "$root_build_dir/bin/$_script_name"
867 inputs = [ 869 inputs = [
868 _build_config, 870 _build_config,
869 ] 871 ]
870 outputs = [ 872 outputs = [
873 depfile,
871 java_script, 874 java_script,
872 ] 875 ]
873 forward_variables_from(invoker, [ "deps" ]) 876 forward_variables_from(invoker, [ "deps" ])
874 _rebased_build_config = rebase_path(_build_config, root_build_dir) 877 _rebased_build_config = rebase_path(_build_config, root_build_dir)
875 args = [ 878 args = [
876 "--depfile", 879 "--depfile",
877 rebase_path(depfile, root_build_dir), 880 rebase_path(depfile, root_build_dir),
878 "--output", 881 "--output",
879 rebase_path(java_script, root_build_dir), 882 rebase_path(java_script, root_build_dir),
880 "--classpath=@FileArg($_rebased_build_config:deps_info:java:full_classpa th)", 883 "--classpath=@FileArg($_rebased_build_config:deps_info:java:full_classpa th)",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 "sources", 924 "sources",
922 "testonly", 925 "testonly",
923 ]) 926 ])
924 927
925 script = "//build/android/gyp/main_dex_list.py" 928 script = "//build/android/gyp/main_dex_list.py"
926 depfile = "$target_gen_dir/$target_name.d" 929 depfile = "$target_gen_dir/$target_name.d"
927 930
928 main_dex_rules = "//build/android/main_dex_classes.flags" 931 main_dex_rules = "//build/android/main_dex_classes.flags"
929 932
930 outputs = [ 933 outputs = [
934 depfile,
931 _main_dex_list_path, 935 _main_dex_list_path,
932 ] 936 ]
933 937
934 args = [ 938 args = [
935 "--depfile", 939 "--depfile",
936 rebase_path(depfile, root_build_dir), 940 rebase_path(depfile, root_build_dir),
937 "--android-sdk-tools", 941 "--android-sdk-tools",
938 rebased_android_sdk_build_tools, 942 rebased_android_sdk_build_tools,
939 "--main-dex-list-path", 943 "--main-dex-list-path",
940 rebase_path(_main_dex_list_path, root_build_dir), 944 rebase_path(_main_dex_list_path, root_build_dir),
(...skipping 16 matching lines...) Expand all
957 forward_variables_from(invoker, 961 forward_variables_from(invoker,
958 [ 962 [
959 "deps", 963 "deps",
960 "inputs", 964 "inputs",
961 "sources", 965 "sources",
962 "testonly", 966 "testonly",
963 ]) 967 ])
964 script = "//build/android/gyp/dex.py" 968 script = "//build/android/gyp/dex.py"
965 depfile = "$target_gen_dir/$target_name.d" 969 depfile = "$target_gen_dir/$target_name.d"
966 outputs = [ 970 outputs = [
971 depfile,
967 invoker.output, 972 invoker.output,
968 ] 973 ]
969 974
970 rebased_output = rebase_path(invoker.output, root_build_dir) 975 rebased_output = rebase_path(invoker.output, root_build_dir)
971 976
972 args = [ 977 args = [
973 "--depfile", 978 "--depfile",
974 rebase_path(depfile, root_build_dir), 979 rebase_path(depfile, root_build_dir),
975 "--android-sdk-tools", 980 "--android-sdk-tools",
976 rebased_android_sdk_build_tools, 981 rebased_android_sdk_build_tools,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 _source_dirs_listing_file = "$target_out_dir/${target_name}_sources.txt" 1153 _source_dirs_listing_file = "$target_out_dir/${target_name}_sources.txt"
1149 _emma_jar = "${android_sdk_root}/tools/lib/emma.jar" 1154 _emma_jar = "${android_sdk_root}/tools/lib/emma.jar"
1150 1155
1151 script = "//build/android/gyp/emma_instr.py" 1156 script = "//build/android/gyp/emma_instr.py"
1152 depfile = "${target_gen_dir}/${target_name}.d" 1157 depfile = "${target_gen_dir}/${target_name}.d"
1153 inputs = invoker.java_files + [ 1158 inputs = invoker.java_files + [
1154 _emma_jar, 1159 _emma_jar,
1155 invoker.input_jar_path, 1160 invoker.input_jar_path,
1156 ] 1161 ]
1157 outputs = [ 1162 outputs = [
1163 depfile,
1158 _coverage_file, 1164 _coverage_file,
1159 _source_dirs_listing_file, 1165 _source_dirs_listing_file,
1160 invoker.output_jar_path, 1166 invoker.output_jar_path,
1161 ] 1167 ]
1162 args = [ 1168 args = [
1163 "instrument_jar", 1169 "instrument_jar",
1164 "--input-path", 1170 "--input-path",
1165 rebase_path(invoker.input_jar_path, root_build_dir), 1171 rebase_path(invoker.input_jar_path, root_build_dir),
1166 "--output-path", 1172 "--output-path",
1167 rebase_path(invoker.output_jar_path, root_build_dir), 1173 rebase_path(invoker.output_jar_path, root_build_dir),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 data_deps = [ 1228 data_deps = [
1223 "//tools/android/md5sum", 1229 "//tools/android/md5sum",
1224 ] # Used when deploying APKs 1230 ] # Used when deploying APKs
1225 1231
1226 inputs = invoker.native_libs + [ invoker.resource_packaged_apk_path ] 1232 inputs = invoker.native_libs + [ invoker.resource_packaged_apk_path ]
1227 if (defined(invoker.dex_path)) { 1233 if (defined(invoker.dex_path)) {
1228 inputs += [ invoker.dex_path ] 1234 inputs += [ invoker.dex_path ]
1229 } 1235 }
1230 1236
1231 outputs = [ 1237 outputs = [
1238 depfile,
1232 invoker.output_apk_path, 1239 invoker.output_apk_path,
1233 ] 1240 ]
1234 1241
1235 _rebased_resource_packaged_apk_path = 1242 _rebased_resource_packaged_apk_path =
1236 rebase_path(invoker.resource_packaged_apk_path, root_build_dir) 1243 rebase_path(invoker.resource_packaged_apk_path, root_build_dir)
1237 _rebased_packaged_apk_path = 1244 _rebased_packaged_apk_path =
1238 rebase_path(invoker.output_apk_path, root_build_dir) 1245 rebase_path(invoker.output_apk_path, root_build_dir)
1239 args = [ 1246 args = [
1240 "--depfile", 1247 "--depfile",
1241 rebase_path(depfile, root_build_dir), 1248 rebase_path(depfile, root_build_dir),
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 "testonly", 1325 "testonly",
1319 ]) 1326 ])
1320 1327
1321 sources = [ 1328 sources = [
1322 invoker.input_apk_path, 1329 invoker.input_apk_path,
1323 ] 1330 ]
1324 inputs = [ 1331 inputs = [
1325 invoker.keystore_path, 1332 invoker.keystore_path,
1326 ] 1333 ]
1327 outputs = [ 1334 outputs = [
1335 depfile,
1328 invoker.output_apk_path, 1336 invoker.output_apk_path,
1329 ] 1337 ]
1330 data = [ 1338 data = [
1331 invoker.output_apk_path, 1339 invoker.output_apk_path,
1332 ] 1340 ]
1333 1341
1334 args = [ 1342 args = [
1335 "--depfile", 1343 "--depfile",
1336 rebase_path(depfile, root_build_dir), 1344 rebase_path(depfile, root_build_dir),
1337 "--zipalign-path", 1345 "--zipalign-path",
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 1462
1455 script = "//build/android/gyp/package_resources.py" 1463 script = "//build/android/gyp/package_resources.py"
1456 depfile = "${target_gen_dir}/${target_name}.d" 1464 depfile = "${target_gen_dir}/${target_name}.d"
1457 inputs = [ 1465 inputs = [
1458 invoker.android_manifest, 1466 invoker.android_manifest,
1459 ] 1467 ]
1460 if (defined(_resources_zip)) { 1468 if (defined(_resources_zip)) {
1461 inputs += [ _resources_zip ] 1469 inputs += [ _resources_zip ]
1462 } 1470 }
1463 outputs = [ 1471 outputs = [
1472 depfile,
1464 invoker.resource_packaged_apk_path, 1473 invoker.resource_packaged_apk_path,
1465 ] 1474 ]
1466 1475
1467 if (defined(invoker.android_aapt_path)) { 1476 if (defined(invoker.android_aapt_path)) {
1468 _android_aapt_path = invoker.android_aapt_path 1477 _android_aapt_path = invoker.android_aapt_path
1469 } else { 1478 } else {
1470 _android_aapt_path = android_default_aapt_path 1479 _android_aapt_path = android_default_aapt_path
1471 } 1480 }
1472 1481
1473 if (defined(invoker.alternative_android_sdk_jar)) { 1482 if (defined(invoker.alternative_android_sdk_jar)) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 "target_gen_dir") + "/AndroidManifest.xml" 1557 "target_gen_dir") + "/AndroidManifest.xml"
1549 action(_generate_incremental_manifest_target_name) { 1558 action(_generate_incremental_manifest_target_name) {
1550 deps = _incremental_deps 1559 deps = _incremental_deps
1551 script = 1560 script =
1552 "//build/android/incremental_install/generate_android_manifest.py" 1561 "//build/android/incremental_install/generate_android_manifest.py"
1553 depfile = "${target_gen_dir}/${target_name}.d" 1562 depfile = "${target_gen_dir}/${target_name}.d"
1554 inputs = [ 1563 inputs = [
1555 _android_manifest, 1564 _android_manifest,
1556 ] 1565 ]
1557 outputs = [ 1566 outputs = [
1567 depfile,
1558 _incremental_android_manifest, 1568 _incremental_android_manifest,
1559 ] 1569 ]
1560 1570
1561 _rebased_src_manifest = rebase_path(_android_manifest, root_build_dir) 1571 _rebased_src_manifest = rebase_path(_android_manifest, root_build_dir)
1562 _rebased_incremental_manifest = 1572 _rebased_incremental_manifest =
1563 rebase_path(_incremental_android_manifest, root_build_dir) 1573 rebase_path(_incremental_android_manifest, root_build_dir)
1564 _rebased_depfile = rebase_path(depfile, root_build_dir) 1574 _rebased_depfile = rebase_path(depfile, root_build_dir)
1565 args = [ 1575 args = [
1566 "--src-manifest=$_rebased_src_manifest", 1576 "--src-manifest=$_rebased_src_manifest",
1567 "--out-manifest=$_rebased_incremental_manifest", 1577 "--out-manifest=$_rebased_incremental_manifest",
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 1992
1983 action(_javac_target_name) { 1993 action(_javac_target_name) {
1984 script = "//build/android/gyp/javac.py" 1994 script = "//build/android/gyp/javac.py"
1985 depfile = "$target_gen_dir/$target_name.d" 1995 depfile = "$target_gen_dir/$target_name.d"
1986 deps = _srcjar_deps 1996 deps = _srcjar_deps
1987 if (defined(invoker.deps)) { 1997 if (defined(invoker.deps)) {
1988 deps += invoker.deps 1998 deps += invoker.deps
1989 } 1999 }
1990 2000
1991 outputs = [ 2001 outputs = [
2002 depfile,
1992 _javac_jar_path, 2003 _javac_jar_path,
1993 _javac_jar_path + ".md5.stamp", 2004 _javac_jar_path + ".md5.stamp",
1994 ] 2005 ]
1995 sources = invoker.java_files + _java_srcjars 2006 sources = invoker.java_files + _java_srcjars
1996 inputs = [ 2007 inputs = [
1997 _build_config, 2008 _build_config,
1998 ] 2009 ]
1999 if (invoker.java_files != []) { 2010 if (invoker.java_files != []) {
2000 inputs += [ invoker.java_sources_file ] 2011 inputs += [ invoker.java_sources_file ]
2001 } 2012 }
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 action(target_name) { 2436 action(target_name) {
2426 forward_variables_from(invoker, 2437 forward_variables_from(invoker,
2427 [ 2438 [
2428 "deps", 2439 "deps",
2429 "visibility", 2440 "visibility",
2430 ]) 2441 ])
2431 script = "//build/android/gyp/process_resources.py" 2442 script = "//build/android/gyp/process_resources.py"
2432 2443
2433 depfile = "$target_gen_dir/$target_name.d" 2444 depfile = "$target_gen_dir/$target_name.d"
2434 outputs = [ 2445 outputs = [
2446 depfile,
2435 zip_path, 2447 zip_path,
2436 srcjar_path, 2448 srcjar_path,
2437 r_text_path, 2449 r_text_path,
2438 ] 2450 ]
2439 2451
2440 _all_resource_dirs = [] 2452 _all_resource_dirs = []
2441 sources = [] 2453 sources = []
2442 2454
2443 if (defined(invoker.resource_dirs)) { 2455 if (defined(invoker.resource_dirs)) {
2444 _all_resource_dirs += invoker.resource_dirs 2456 _all_resource_dirs += invoker.resource_dirs
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 invoker.has_code, 2638 invoker.has_code,
2627 ] 2639 ]
2628 } 2640 }
2629 args += [ 2641 args += [
2630 "--depfile", 2642 "--depfile",
2631 rebase_path(depfile, root_build_dir), 2643 rebase_path(depfile, root_build_dir),
2632 ] 2644 ]
2633 2645
2634 script = "//build/android/gyp/generate_split_manifest.py" 2646 script = "//build/android/gyp/generate_split_manifest.py"
2635 outputs = [ 2647 outputs = [
2648 depfile,
2636 invoker.out_manifest, 2649 invoker.out_manifest,
2637 ] 2650 ]
2638 inputs = [ 2651 inputs = [
2639 invoker.main_manifest, 2652 invoker.main_manifest,
2640 ] 2653 ]
2641 } 2654 }
2642 } 2655 }
2643 } 2656 }
OLDNEW
« no previous file with comments | « android_webview/BUILD.gn ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698