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

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

Issue 1354153004: GN: Don't build final_dex when building *_incremental targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split up Created 5 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 | « no previous file | 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/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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 620 }
621 if (defined(invoker.dex_path)) { 621 if (defined(invoker.dex_path)) {
622 _dex_path = invoker.dex_path 622 _dex_path = invoker.dex_path
623 } 623 }
624 _load_library_from_apk = invoker.load_library_from_apk 624 _load_library_from_apk = invoker.load_library_from_apk
625 625
626 _deps = [] 626 _deps = []
627 if (defined(invoker.deps)) { 627 if (defined(invoker.deps)) {
628 _deps = invoker.deps 628 _deps = invoker.deps
629 } 629 }
630 _incremental_deps = []
631 if (defined(invoker.incremental_deps)) {
632 _incremental_deps = invoker.incremental_deps
633 }
630 634
631 _native_libs_dir = "//build/android/empty/res" 635 _native_libs_dir = "//build/android/empty/res"
632 if (defined(invoker.native_libs_dir)) { 636 if (defined(invoker.native_libs_dir)) {
633 _native_libs_dir = invoker.native_libs_dir 637 _native_libs_dir = invoker.native_libs_dir
634 } 638 }
635 639
636 if (defined(invoker.asset_location)) { 640 if (defined(invoker.asset_location)) {
637 _asset_location = invoker.asset_location 641 _asset_location = invoker.asset_location
638 assert(_asset_location != "") # Mark as used. 642 assert(_asset_location != "") # Mark as used.
639 } 643 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 android_manifest = _android_manifest 756 android_manifest = _android_manifest
753 resource_packaged_apk_path = _resource_packaged_apk_path 757 resource_packaged_apk_path = _resource_packaged_apk_path
754 } 758 }
755 759
756 _generate_incremental_manifest_target_name = 760 _generate_incremental_manifest_target_name =
757 "${target_name}_incremental_generate_manifest" 761 "${target_name}_incremental_generate_manifest"
758 _incremental_android_manifest = 762 _incremental_android_manifest =
759 get_label_info(_generate_incremental_manifest_target_name, 763 get_label_info(_generate_incremental_manifest_target_name,
760 "target_gen_dir") + "/AndroidManifest.xml" 764 "target_gen_dir") + "/AndroidManifest.xml"
761 action(_generate_incremental_manifest_target_name) { 765 action(_generate_incremental_manifest_target_name) {
762 deps = _deps 766 deps = _incremental_deps
763 script = "//build/android/incremental_install/generate_android_manifest.py" 767 script = "//build/android/incremental_install/generate_android_manifest.py"
764 depfile = "${target_gen_dir}/${target_name}.d" 768 depfile = "${target_gen_dir}/${target_name}.d"
765 inputs = [ 769 inputs = [
766 _android_manifest, 770 _android_manifest,
767 ] 771 ]
768 outputs = [ 772 outputs = [
769 depfile, 773 depfile,
770 _incremental_android_manifest, 774 _incremental_android_manifest,
771 ] 775 ]
772 776
773 _rebased_src_manifest = rebase_path(_android_manifest, root_build_dir) 777 _rebased_src_manifest = rebase_path(_android_manifest, root_build_dir)
774 _rebased_incremental_manifest = 778 _rebased_incremental_manifest =
775 rebase_path(_incremental_android_manifest, root_build_dir) 779 rebase_path(_incremental_android_manifest, root_build_dir)
776 args = [ 780 args = [
777 "--src-manifest=$_rebased_src_manifest", 781 "--src-manifest=$_rebased_src_manifest",
778 "--out-manifest=$_rebased_incremental_manifest", 782 "--out-manifest=$_rebased_incremental_manifest",
779 ] 783 ]
780 if (disable_incremental_isolated_processes) { 784 if (disable_incremental_isolated_processes) {
781 args += [ "--disable-isolated-processes" ] 785 args += [ "--disable-isolated-processes" ]
782 } 786 }
783 } 787 }
784 788
785 _incremental_package_resources_target_name = 789 _incremental_package_resources_target_name =
786 "${target_name}_incremental__package_resources" 790 "${target_name}_incremental__package_resources"
787 791
788 # TODO(agrieve): See if we can speed up this step by swapping the manifest 792 # TODO(agrieve): See if we can speed up this step by swapping the manifest
789 # from the result of the main package_resources step. 793 # from the result of the main package_resources step.
790 package_resources_helper(_incremental_package_resources_target_name) { 794 package_resources_helper(_incremental_package_resources_target_name) {
791 forward_variables_from(invoker, [ "extensions_to_not_compress" ]) 795 forward_variables_from(invoker, [ "extensions_to_not_compress" ])
792 deps = _deps + [ ":$_generate_incremental_manifest_target_name" ] 796 deps =
797 _incremental_deps + [ ":$_generate_incremental_manifest_target_name" ]
793 android_manifest = _incremental_android_manifest 798 android_manifest = _incremental_android_manifest
794 resource_packaged_apk_path = _incremental_resource_packaged_apk_path 799 resource_packaged_apk_path = _incremental_resource_packaged_apk_path
795 } 800 }
796 801
797 package_target = "${target_name}__package" 802 package_target = "${target_name}__package"
798 package_apk(package_target) { 803 package_apk(package_target) {
799 deps = _deps + [ ":${_package_resources_target_name}" ] 804 deps = _deps + [ ":${_package_resources_target_name}" ]
800 805
801 if (defined(_dex_path)) { 806 if (defined(_dex_path)) {
802 dex_path = _dex_path 807 dex_path = _dex_path
803 } 808 }
804 native_libs_dir = _native_libs_dir 809 native_libs_dir = _native_libs_dir
805 output_apk_path = _packaged_apk_path 810 output_apk_path = _packaged_apk_path
806 resource_packaged_apk_path = _resource_packaged_apk_path 811 resource_packaged_apk_path = _resource_packaged_apk_path
807 } 812 }
808 813
809 _incremental_package_target = "${target_name}_incremental__package" 814 _incremental_package_target = "${target_name}_incremental__package"
810 package_apk(_incremental_package_target) { 815 package_apk(_incremental_package_target) {
811 _dex_target = "//build/android/incremental_install:bootstrap_java__dex" 816 _dex_target = "//build/android/incremental_install:bootstrap_java__dex"
812 deps = _deps + [ 817 deps = _incremental_deps + [
813 ":${_incremental_package_resources_target_name}", 818 ":${_incremental_package_resources_target_name}",
814 _dex_target, 819 _dex_target,
815 ] 820 ]
816 821
817 if (defined(_dex_path)) { 822 if (defined(_dex_path)) {
818 dex_path = 823 dex_path =
819 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex" 824 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex"
820 } 825 }
821 826
822 # TODO(agrieve): Add a placeholder .so for http://crbug.com/384638 827 # TODO(agrieve): Add a placeholder .so for http://crbug.com/384638
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 ] 1648 ]
1644 args = [ 1649 args = [
1645 "--depfile", 1650 "--depfile",
1646 rebase_path(depfile, root_build_dir), 1651 rebase_path(depfile, root_build_dir),
1647 "--script-output-path", 1652 "--script-output-path",
1648 rebase_path(generated_script, root_build_dir), 1653 rebase_path(generated_script, root_build_dir),
1649 ] 1654 ]
1650 args += test_runner_args 1655 args += test_runner_args
1651 } 1656 }
1652 } 1657 }
OLDNEW
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698