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

Side by Side Diff: build/config/android/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 | « build/config/android/internal_rules.gni ('k') | chrome/android/BUILD.gn » ('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/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/android/internal_rules.gni") 6 import("//build/config/android/internal_rules.gni")
7 import("//build/config/dcheck_always_on.gni") 7 import("//build/config/dcheck_always_on.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 9
10 assert(is_android) 10 assert(is_android)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 action(_find_deps_target_name) { 42 action(_find_deps_target_name) {
43 forward_variables_from(invoker, [ "deps" ]) 43 forward_variables_from(invoker, [ "deps" ])
44 44
45 script = "//build/android/gyp/write_ordered_libraries.py" 45 script = "//build/android/gyp/write_ordered_libraries.py"
46 depfile = "$target_gen_dir/$target_name.d" 46 depfile = "$target_gen_dir/$target_name.d"
47 inputs = [ 47 inputs = [
48 invoker.binary, 48 invoker.binary,
49 android_readelf, 49 android_readelf,
50 ] 50 ]
51 outputs = [ 51 outputs = [
52 depfile,
52 _libraries_list, 53 _libraries_list,
53 ] 54 ]
54 rebased_binaries = rebase_path([ invoker.binary ], root_build_dir) 55 rebased_binaries = rebase_path([ invoker.binary ], root_build_dir)
55 args = [ 56 args = [
56 "--depfile", 57 "--depfile",
57 rebase_path(depfile, root_build_dir), 58 rebase_path(depfile, root_build_dir),
58 "--input-libraries=$rebased_binaries", 59 "--input-libraries=$rebased_binaries",
59 "--libraries-dir", 60 "--libraries-dir",
60 rebase_path(root_shlib_dir, root_build_dir), 61 rebase_path(root_shlib_dir, root_build_dir),
61 "--output", 62 "--output",
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 jni_generator_include = 178 jni_generator_include =
178 "//base/android/jni_generator/jni_generator_helper.h" 179 "//base/android/jni_generator/jni_generator_helper.h"
179 180
180 foreach_target_name = "${target_name}__jni_gen" 181 foreach_target_name = "${target_name}__jni_gen"
181 action_foreach(foreach_target_name) { 182 action_foreach(foreach_target_name) {
182 script = "//base/android/jni_generator/jni_generator.py" 183 script = "//base/android/jni_generator/jni_generator.py"
183 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d" 184 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d"
184 sources = invoker.sources 185 sources = invoker.sources
185 outputs = [ 186 outputs = [
187 depfile,
186 "${jni_output_dir}/{{source_name_part}}_jni.h", 188 "${jni_output_dir}/{{source_name_part}}_jni.h",
187 ] 189 ]
188 190
189 args = [ 191 args = [
190 "--depfile", 192 "--depfile",
191 rebase_path(depfile, root_build_dir), 193 rebase_path(depfile, root_build_dir),
192 "--input_file={{source}}", 194 "--input_file={{source}}",
193 "--optimize_generation=1", 195 "--optimize_generation=1",
194 "--ptr_type=long", 196 "--ptr_type=long",
195 "--output_dir", 197 "--output_dir",
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 jni_actions += [ ":$jni_target_name" ] 281 jni_actions += [ ":$jni_target_name" ]
280 action(jni_target_name) { 282 action(jni_target_name) {
281 # The sources aren't compiled so don't check their dependencies. 283 # The sources aren't compiled so don't check their dependencies.
282 check_includes = false 284 check_includes = false
283 depfile = "$target_gen_dir/$target_name.d" 285 depfile = "$target_gen_dir/$target_name.d"
284 script = "//base/android/jni_generator/jni_generator.py" 286 script = "//base/android/jni_generator/jni_generator.py"
285 sources = [ 287 sources = [
286 jar_file, 288 jar_file,
287 ] 289 ]
288 outputs = [ 290 outputs = [
291 depfile,
289 "${jni_output_dir}/${classname}_jni.h", 292 "${jni_output_dir}/${classname}_jni.h",
290 ] 293 ]
291 294
292 args = [ 295 args = [
293 "--depfile", 296 "--depfile",
294 rebase_path(depfile, root_build_dir), 297 rebase_path(depfile, root_build_dir),
295 "--jar_file", 298 "--jar_file",
296 rebase_path(jar_file, root_build_dir), 299 rebase_path(jar_file, root_build_dir),
297 "--input_file", 300 "--input_file",
298 class, 301 class,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 script = "//build/android/gyp/gcc_preprocess.py" 384 script = "//build/android/gyp/gcc_preprocess.py"
382 if (defined(invoker.inputs)) { 385 if (defined(invoker.inputs)) {
383 inputs = invoker.inputs + [] 386 inputs = invoker.inputs + []
384 } 387 }
385 depfile = 388 depfile =
386 "${target_gen_dir}/${invoker.target_name}_{{source_name_part}}.d" 389 "${target_gen_dir}/${invoker.target_name}_{{source_name_part}}.d"
387 390
388 sources = invoker.sources 391 sources = invoker.sources
389 392
390 outputs = [ 393 outputs = [
394 depfile,
391 "$_base_gen_dir/${invoker.package_name}/{{source_name_part}}.java", 395 "$_base_gen_dir/${invoker.package_name}/{{source_name_part}}.java",
392 ] 396 ]
393 397
394 args = [ 398 args = [
395 "--depfile", 399 "--depfile",
396 rebase_path(depfile, root_build_dir), 400 rebase_path(depfile, root_build_dir),
397 "--include-path", 401 "--include-path",
398 rebase_path(_include_path, root_build_dir), 402 rebase_path(_include_path, root_build_dir),
399 "--output", 403 "--output",
400 rebase_path(outputs[0], root_build_dir), 404 rebase_path(outputs[1], root_build_dir),
401 "--template={{source}}", 405 "--template={{source}}",
402 ] 406 ]
403 407
404 if (defined(invoker.defines)) { 408 if (defined(invoker.defines)) {
405 foreach(def, invoker.defines) { 409 foreach(def, invoker.defines) {
406 args += [ 410 args += [
407 "--defines", 411 "--defines",
408 def, 412 def,
409 ] 413 ]
410 } 414 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 _srcjar_path = "${target_gen_dir}/${target_name}.srcjar" 469 _srcjar_path = "${target_gen_dir}/${target_name}.srcjar"
466 _rebased_srcjar_path = rebase_path(_srcjar_path, root_build_dir) 470 _rebased_srcjar_path = rebase_path(_srcjar_path, root_build_dir)
467 _rebased_sources = rebase_path(invoker.sources, root_build_dir) 471 _rebased_sources = rebase_path(invoker.sources, root_build_dir)
468 472
469 args = [ 473 args = [
470 "--depfile", 474 "--depfile",
471 rebase_path(depfile, root_build_dir), 475 rebase_path(depfile, root_build_dir),
472 "--srcjar=$_rebased_srcjar_path", 476 "--srcjar=$_rebased_srcjar_path",
473 ] + _rebased_sources 477 ] + _rebased_sources
474 outputs = [ 478 outputs = [
479 depfile,
475 _srcjar_path, 480 _srcjar_path,
476 ] 481 ]
477 } 482 }
478 } 483 }
479 484
480 # Declare a target for processing a Jinja template. 485 # Declare a target for processing a Jinja template.
481 # 486 #
482 # Variables 487 # Variables
483 # input: The template file to be processed. 488 # input: The template file to be processed.
484 # output: Where to save the result. 489 # output: Where to save the result.
(...skipping 19 matching lines...) Expand all
504 "deps", 509 "deps",
505 ]) 510 ])
506 511
507 sources = [ 512 sources = [
508 invoker.input, 513 invoker.input,
509 ] 514 ]
510 script = "//build/android/gyp/jinja_template.py" 515 script = "//build/android/gyp/jinja_template.py"
511 depfile = "$target_gen_dir/$target_name.d" 516 depfile = "$target_gen_dir/$target_name.d"
512 517
513 outputs = [ 518 outputs = [
519 depfile,
514 invoker.output, 520 invoker.output,
515 ] 521 ]
516 522
517 args = [ 523 args = [
518 "--loader-base-dir", 524 "--loader-base-dir",
519 rebase_path("//", root_build_dir), 525 rebase_path("//", root_build_dir),
520 "--inputs", 526 "--inputs",
521 rebase_path(invoker.input, root_build_dir), 527 rebase_path(invoker.input, root_build_dir),
522 "--output", 528 "--output",
523 rebase_path(invoker.output, root_build_dir), 529 rebase_path(invoker.output, root_build_dir),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 resources_zip = _resources_zip 574 resources_zip = _resources_zip
569 type = "android_resources" 575 type = "android_resources"
570 } 576 }
571 577
572 action("${target_name}__template") { 578 action("${target_name}__template") {
573 sources = invoker.resources 579 sources = invoker.resources
574 script = "//build/android/gyp/jinja_template.py" 580 script = "//build/android/gyp/jinja_template.py"
575 depfile = "$target_gen_dir/$target_name.d" 581 depfile = "$target_gen_dir/$target_name.d"
576 582
577 outputs = [ 583 outputs = [
584 depfile,
578 _resources_zip, 585 _resources_zip,
579 ] 586 ]
580 587
581 rebased_resources = rebase_path(invoker.resources, root_build_dir) 588 rebased_resources = rebase_path(invoker.resources, root_build_dir)
582 args = [ 589 args = [
583 "--inputs=${rebased_resources}", 590 "--inputs=${rebased_resources}",
584 "--inputs-base-dir", 591 "--inputs-base-dir",
585 rebase_path(invoker.res_dir, root_build_dir), 592 rebase_path(invoker.res_dir, root_build_dir),
586 "--outputs-zip", 593 "--outputs-zip",
587 rebase_path(_resources_zip, root_build_dir), 594 rebase_path(_resources_zip, root_build_dir),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 action("${target_name}__create_resources_zip") { 644 action("${target_name}__create_resources_zip") {
638 forward_variables_from(invoker, 645 forward_variables_from(invoker,
639 [ 646 [
640 "deps", 647 "deps",
641 "sources", 648 "sources",
642 ]) 649 ])
643 script = "//build/android/gyp/locale_pak_resources.py" 650 script = "//build/android/gyp/locale_pak_resources.py"
644 depfile = "$target_gen_dir/$target_name.d" 651 depfile = "$target_gen_dir/$target_name.d"
645 652
646 outputs = [ 653 outputs = [
654 depfile,
647 _resources_zip, 655 _resources_zip,
648 ] 656 ]
649 657
650 _rebased_sources = rebase_path(sources, root_build_dir) 658 _rebased_sources = rebase_path(sources, root_build_dir)
651 args = [ 659 args = [
652 "--locale-paks=${_rebased_sources}", 660 "--locale-paks=${_rebased_sources}",
653 "--resources-zip", 661 "--resources-zip",
654 rebase_path(_resources_zip, root_build_dir), 662 rebase_path(_resources_zip, root_build_dir),
655 "--depfile", 663 "--depfile",
656 rebase_path(depfile, root_build_dir), 664 rebase_path(depfile, root_build_dir),
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { 1815 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) {
1808 _dist_ijar_path = "$root_build_dir/test.lib.java/" + 1816 _dist_ijar_path = "$root_build_dir/test.lib.java/" +
1809 get_path_info(_final_apk_path, "name") + ".jar" 1817 get_path_info(_final_apk_path, "name") + ".jar"
1810 action("${_template_name}_dist_ijar") { 1818 action("${_template_name}_dist_ijar") {
1811 script = "//build/android/gyp/create_dist_jar.py" 1819 script = "//build/android/gyp/create_dist_jar.py"
1812 depfile = "$target_gen_dir/$target_name.d" 1820 depfile = "$target_gen_dir/$target_name.d"
1813 inputs = [ 1821 inputs = [
1814 _build_config, 1822 _build_config,
1815 ] 1823 ]
1816 outputs = [ 1824 outputs = [
1825 depfile,
1817 "${_dist_ijar_path}", 1826 "${_dist_ijar_path}",
1818 ] 1827 ]
1819 data = [ 1828 data = [
1820 _dist_ijar_path, 1829 _dist_ijar_path,
1821 ] 1830 ]
1822 args = [ 1831 args = [
1823 "--depfile", 1832 "--depfile",
1824 rebase_path(depfile, root_build_dir), 1833 rebase_path(depfile, root_build_dir),
1825 "--output", 1834 "--output",
1826 rebase_path("${_dist_ijar_path}", root_build_dir), 1835 rebase_path("${_dist_ijar_path}", root_build_dir),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 1945
1937 action(_prepare_native_target_name) { 1946 action(_prepare_native_target_name) {
1938 forward_variables_from(invoker, 1947 forward_variables_from(invoker,
1939 [ 1948 [
1940 "deps", 1949 "deps",
1941 "public_deps", 1950 "public_deps",
1942 ]) 1951 ])
1943 script = "//build/android/gyp/pack_relocations.py" 1952 script = "//build/android/gyp/pack_relocations.py"
1944 depfile = "$target_gen_dir/$target_name.d" 1953 depfile = "$target_gen_dir/$target_name.d"
1945 outputs = [ 1954 outputs = [
1955 depfile,
1946 _native_libs_json, 1956 _native_libs_json,
1947 ] 1957 ]
1948 1958
1949 inputs = [ 1959 inputs = [
1950 _build_config, 1960 _build_config,
1951 ] 1961 ]
1952 1962
1953 deps += _native_libs_deps 1963 deps += _native_libs_deps
1954 deps += [ 1964 deps += [
1955 ":$build_config_target", 1965 ":$build_config_target",
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 _create_incremental_script_rule_name = 2136 _create_incremental_script_rule_name =
2127 "${_template_name}__incremental_script" 2137 "${_template_name}__incremental_script"
2128 action(_create_incremental_script_rule_name) { 2138 action(_create_incremental_script_rule_name) {
2129 script = "//build/android/incremental_install/create_install_script.py" 2139 script = "//build/android/incremental_install/create_install_script.py"
2130 depfile = "$target_gen_dir/$target_name.d" 2140 depfile = "$target_gen_dir/$target_name.d"
2131 deps = [ 2141 deps = [
2132 _native_libs_file_arg_dep, 2142 _native_libs_file_arg_dep,
2133 ] 2143 ]
2134 2144
2135 outputs = [ 2145 outputs = [
2146 depfile,
2136 _incremental_install_script_path, 2147 _incremental_install_script_path,
2137 ] 2148 ]
2138 2149
2139 _rebased_apk_path_no_ext = 2150 _rebased_apk_path_no_ext =
2140 rebase_path(_final_apk_path_no_ext, root_build_dir) 2151 rebase_path(_final_apk_path_no_ext, root_build_dir)
2141 _rebased_incremental_install_script_path = 2152 _rebased_incremental_install_script_path =
2142 rebase_path(_incremental_install_script_path, root_build_dir) 2153 rebase_path(_incremental_install_script_path, root_build_dir)
2143 _rebased_depfile = rebase_path(depfile, root_build_dir) 2154 _rebased_depfile = rebase_path(depfile, root_build_dir)
2144 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" 2155 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
2145 args = [ 2156 args = [
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 imports = [ framework_aidl ] 2493 imports = [ framework_aidl ]
2483 if (defined(invoker.interface_file)) { 2494 if (defined(invoker.interface_file)) {
2484 assert(invoker.interface_file != "") 2495 assert(invoker.interface_file != "")
2485 imports += [ invoker.interface_file ] 2496 imports += [ invoker.interface_file ]
2486 } 2497 }
2487 2498
2488 inputs = [ aidl_path ] + imports 2499 inputs = [ aidl_path ] + imports
2489 2500
2490 depfile = "${target_gen_dir}/${target_name}.d" 2501 depfile = "${target_gen_dir}/${target_name}.d"
2491 outputs = [ 2502 outputs = [
2503 depfile,
2492 srcjar_path, 2504 srcjar_path,
2493 ] 2505 ]
2494 rebased_imports = rebase_path(imports, root_build_dir) 2506 rebased_imports = rebase_path(imports, root_build_dir)
2495 args = [ 2507 args = [
2496 "--depfile", 2508 "--depfile",
2497 rebase_path(depfile, root_build_dir), 2509 rebase_path(depfile, root_build_dir),
2498 "--aidl-path", 2510 "--aidl-path",
2499 rebase_path(aidl_path, root_build_dir), 2511 rebase_path(aidl_path, root_build_dir),
2500 "--imports=$rebased_imports", 2512 "--imports=$rebased_imports",
2501 "--srcjar", 2513 "--srcjar",
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 deps = [ 2564 deps = [
2553 _protoc_dep, 2565 _protoc_dep,
2554 ] 2566 ]
2555 if (defined(invoker.deps)) { 2567 if (defined(invoker.deps)) {
2556 deps += invoker.deps 2568 deps += invoker.deps
2557 } 2569 }
2558 2570
2559 sources = invoker.sources 2571 sources = invoker.sources
2560 depfile = "$target_gen_dir/$target_name.d" 2572 depfile = "$target_gen_dir/$target_name.d"
2561 outputs = [ 2573 outputs = [
2574 depfile,
2562 srcjar_path, 2575 srcjar_path,
2563 ] 2576 ]
2564 args = [ 2577 args = [
2565 "--depfile", 2578 "--depfile",
2566 rebase_path(depfile, root_build_dir), 2579 rebase_path(depfile, root_build_dir),
2567 "--protoc", 2580 "--protoc",
2568 rebase_path(_protoc_bin, root_build_dir), 2581 rebase_path(_protoc_bin, root_build_dir),
2569 "--proto-path", 2582 "--proto-path",
2570 rebase_path(_proto_path, root_build_dir), 2583 rebase_path(_proto_path, root_build_dir),
2571 "--srcjar", 2584 "--srcjar",
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 supports_android = true 2706 supports_android = true
2694 jar_path = "${_output_path}/$jar" 2707 jar_path = "${_output_path}/$jar"
2695 } 2708 }
2696 } 2709 }
2697 2710
2698 java_group(target_name) { 2711 java_group(target_name) {
2699 deps = _resource_targets + _jar_targets 2712 deps = _resource_targets + _jar_targets
2700 } 2713 }
2701 } 2714 }
2702 } 2715 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698