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

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

Issue 1473273002: GN(Android): Add libosmesa.so to ContentShell.apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 # Creates an unsigned .apk. 658 # Creates an unsigned .apk.
659 # 659 #
660 # Variables 660 # Variables
661 # assets_build_config: Path to android_apk .build_config containing merged 661 # assets_build_config: Path to android_apk .build_config containing merged
662 # asset information. 662 # asset information.
663 # deps: Specifies the dependencies of this target. 663 # deps: Specifies the dependencies of this target.
664 # dex_path: Path to classes.dex file to include (optional). 664 # dex_path: Path to classes.dex file to include (optional).
665 # resource_packaged_apk_path: Path to .ap_ to use. 665 # resource_packaged_apk_path: Path to .ap_ to use.
666 # output_apk_path: Output path for the generated .apk. 666 # output_apk_path: Output path for the generated .apk.
667 # native_libs: List of .so files to include.
667 # native_lib_placeholders: List of placeholder filenames to add to the apk 668 # native_lib_placeholders: List of placeholder filenames to add to the apk
668 # (optional). 669 # (optional).
669 # native_libs_dir: Directory containing native libraries. 670 # native_libs_dir: Directory containing native libraries.
670 template("package_apk") { 671 template("package_apk") {
671 action(target_name) { 672 action(target_name) {
672 forward_variables_from(invoker, 673 forward_variables_from(invoker,
673 [ 674 [
674 "deps", 675 "deps",
675 "public_deps", 676 "public_deps",
676 "testonly", 677 "testonly",
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 rebase_path(invoker.assets_build_config, root_build_dir) 715 rebase_path(invoker.assets_build_config, root_build_dir)
715 args += [ 716 args += [
716 "--assets=@FileArg($_rebased_build_config:assets)", 717 "--assets=@FileArg($_rebased_build_config:assets)",
717 "--uncompressed-assets=@FileArg($_rebased_build_config:uncompressed_asse ts)", 718 "--uncompressed-assets=@FileArg($_rebased_build_config:uncompressed_asse ts)",
718 ] 719 ]
719 } 720 }
720 if (defined(invoker.dex_path)) { 721 if (defined(invoker.dex_path)) {
721 _rebased_dex_path = rebase_path(invoker.dex_path, root_build_dir) 722 _rebased_dex_path = rebase_path(invoker.dex_path, root_build_dir)
722 args += [ "--dex-file=$_rebased_dex_path" ] 723 args += [ "--dex-file=$_rebased_dex_path" ]
723 } 724 }
724 if (defined(invoker.native_libs_dir) || _native_lib_placeholders != []) { 725 if (defined(invoker.native_libs_dir) || defined(invoker.native_libs) ||
726 _native_lib_placeholders != []) {
725 args += [ "--android-abi=$android_app_abi" ] 727 args += [ "--android-abi=$android_app_abi" ]
726 } 728 }
727 if (defined(invoker.native_libs_dir)) { 729 if (defined(invoker.native_libs_dir)) {
728 _rebased_native_libs_dir = 730 _rebased_native_libs_dir =
729 rebase_path(invoker.native_libs_dir, root_build_dir) 731 rebase_path(invoker.native_libs_dir, root_build_dir)
730 args += [ "--native-libs-dir=$_rebased_native_libs_dir/$android_app_abi" ] 732 args += [ "--native-libs-dir=$_rebased_native_libs_dir/$android_app_abi" ]
731 } 733 }
734 if (defined(invoker.native_libs)) {
735 _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir)
736 args += [ "--native-libs=$_rebased_native_libs" ]
737 }
732 if (_native_lib_placeholders != []) { 738 if (_native_lib_placeholders != []) {
733 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ] 739 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ]
734 } 740 }
735 741
736 if (defined(invoker.emma_instrument) && invoker.emma_instrument) { 742 if (defined(invoker.emma_instrument) && invoker.emma_instrument) {
737 _emma_device_jar = "$android_sdk_root/tools/lib/emma_device.jar" 743 _emma_device_jar = "$android_sdk_root/tools/lib/emma_device.jar"
738 _rebased_emma_device_jar = rebase_path(_emma_device_jar, root_build_dir) 744 _rebased_emma_device_jar = rebase_path(_emma_device_jar, root_build_dir)
739 args += [ "--emma-device-jar=$_rebased_emma_device_jar" ] 745 args += [ "--emma-device-jar=$_rebased_emma_device_jar" ]
740 } 746 }
741 } 747 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 resource_packaged_apk_path = _incremental_resource_packaged_apk_path 1007 resource_packaged_apk_path = _incremental_resource_packaged_apk_path
1002 } 1008 }
1003 1009
1004 package_target = "${target_name}__package" 1010 package_target = "${target_name}__package"
1005 package_apk(package_target) { 1011 package_apk(package_target) {
1006 forward_variables_from(invoker, 1012 forward_variables_from(invoker,
1007 [ 1013 [
1008 "assets_build_config", 1014 "assets_build_config",
1009 "emma_instrument", 1015 "emma_instrument",
1010 "native_lib_placeholders", 1016 "native_lib_placeholders",
1017 "native_libs",
1011 "native_libs_dir", 1018 "native_libs_dir",
1012 ]) 1019 ])
1013 deps = _deps + [ ":${_package_resources_target_name}" ] 1020 deps = _deps + [ ":${_package_resources_target_name}" ]
1014 1021
1015 if (defined(_dex_path)) { 1022 if (defined(_dex_path)) {
1016 dex_path = _dex_path 1023 dex_path = _dex_path
1017 } 1024 }
1018 1025
1019 output_apk_path = _packaged_apk_path 1026 output_apk_path = _packaged_apk_path
1020 resource_packaged_apk_path = _resource_packaged_apk_path 1027 resource_packaged_apk_path = _resource_packaged_apk_path
1021 } 1028 }
1022 1029
1023 _incremental_package_target = "${target_name}_incremental__package" 1030 _incremental_package_target = "${target_name}_incremental__package"
1024 package_apk(_incremental_package_target) { 1031 package_apk(_incremental_package_target) {
1025 forward_variables_from(invoker, 1032 forward_variables_from(invoker,
1026 [ 1033 [
1027 "assets_build_config", 1034 "assets_build_config",
1028 "emma_instrument", 1035 "emma_instrument",
1036 "native_libs",
1029 ]) 1037 ])
1030 _dex_target = "//build/android/incremental_install:bootstrap_java__dex" 1038 _dex_target = "//build/android/incremental_install:bootstrap_java__dex"
1031 deps = _incremental_deps + [ 1039 deps = _incremental_deps + [
1032 ":${_incremental_package_resources_target_name}", 1040 ":${_incremental_package_resources_target_name}",
1033 _dex_target, 1041 _dex_target,
1034 ] 1042 ]
1035 1043
1036 if (defined(_dex_path)) { 1044 if (defined(_dex_path)) {
1037 dex_path = 1045 dex_path =
1038 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex" 1046 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex"
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 ] 1987 ]
1980 args = [ 1988 args = [
1981 "--depfile", 1989 "--depfile",
1982 rebase_path(depfile, root_build_dir), 1990 rebase_path(depfile, root_build_dir),
1983 "--script-output-path", 1991 "--script-output-path",
1984 rebase_path(generated_script, root_build_dir), 1992 rebase_path(generated_script, root_build_dir),
1985 ] 1993 ]
1986 args += test_runner_args 1994 args += test_runner_args
1987 } 1995 }
1988 } 1996 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698