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

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

Issue 2326973003: Reland of Make secondary abi work for component build (Closed)
Patch Set: guard import behind enable_java_templates 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/android/gyp/write_build_config.py ('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 import("//third_party/android_platform/config.gni")
Michael Achenbach 2016/09/12 06:37:02 So why import it here unconditionally when it's im
agrieve 2016/09/12 14:00:47 aah! Sorry :(
8 9
9 assert(is_android) 10 assert(is_android)
10 11
11 # These identify targets that have .build_config files (except for android_apk, 12 # These identify targets that have .build_config files (except for android_apk,
12 # java_binary, resource_rewriter, since we never need to depend on these). 13 # java_binary, resource_rewriter, since we never need to depend on these).
13 _java_target_whitelist = [ 14 _java_target_whitelist = [
14 "*:*_java", 15 "*:*_java",
15 "*:*_javalib", 16 "*:*_javalib",
16 "*:*_java_*", # e.g. java_test_support 17 "*:*_java_*", # e.g. java_test_support
17 "*:java", 18 "*:java",
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 # Don't list shared_libraries_runtime_deps_file as an input in order to 294 # Don't list shared_libraries_runtime_deps_file as an input in order to
294 # avoid having to depend on the runtime_deps target. See comment in 295 # avoid having to depend on the runtime_deps target. See comment in
295 # rules.gni for why we do this. 296 # rules.gni for why we do this.
296 args += [ 297 args += [
297 "--shared-libraries-runtime-deps", 298 "--shared-libraries-runtime-deps",
298 rebase_path(invoker.shared_libraries_runtime_deps_file, 299 rebase_path(invoker.shared_libraries_runtime_deps_file,
299 root_build_dir), 300 root_build_dir),
300 ] 301 ]
301 } 302 }
302 303
304 if (defined(invoker.secondary_abi_shared_libraries_runtime_deps_file)) {
305 # Don't list secondary_abi_shared_libraries_runtime_deps_file as an
306 # input in order to avoid having to depend on the runtime_deps target.
307 # See comment in rules.gni for why we do this.
308 args += [
309 "--secondary-abi-shared-libraries-runtime-deps",
310 rebase_path(invoker.secondary_abi_shared_libraries_runtime_deps_file,
311 root_build_dir),
312 ]
313 }
314
303 if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) { 315 if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) {
304 args += [ 316 args += [
305 "--proguard-enabled", 317 "--proguard-enabled",
306 "--proguard-info", 318 "--proguard-info",
307 rebase_path(invoker.proguard_info, root_build_dir), 319 rebase_path(invoker.proguard_info, root_build_dir),
308 ] 320 ]
309 } 321 }
310 322
311 if (defined(invoker.apk_path)) { 323 if (defined(invoker.apk_path)) {
312 _rebased_apk_path = rebase_path(invoker.apk_path, root_build_dir) 324 _rebased_apk_path = rebase_path(invoker.apk_path, root_build_dir)
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 "--script-output-path", 634 "--script-output-path",
623 rebase_path(generated_script, root_build_dir), 635 rebase_path(generated_script, root_build_dir),
624 ] 636 ]
625 args += test_runner_args 637 args += test_runner_args
626 } 638 }
627 } 639 }
628 640
629 if (enable_java_templates) { 641 if (enable_java_templates) {
630 import("//build/config/zip.gni") 642 import("//build/config/zip.gni")
631 import("//third_party/ijar/ijar.gni") 643 import("//third_party/ijar/ijar.gni")
644 import("//third_party/android_platform/config.gni")
632 645
633 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) 646 rebased_android_sdk = rebase_path(android_sdk, root_build_dir)
634 rebased_android_sdk_build_tools = 647 rebased_android_sdk_build_tools =
635 rebase_path(android_sdk_build_tools, root_build_dir) 648 rebase_path(android_sdk_build_tools, root_build_dir)
636 649
637 android_sdk_jar = "$android_sdk/android.jar" 650 android_sdk_jar = "$android_sdk/android.jar"
638 rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) 651 rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir)
639 android_default_aapt_path = "$rebased_android_sdk_build_tools/aapt" 652 android_default_aapt_path = "$rebased_android_sdk_build_tools/aapt"
640 653
641 android_configuration_name = "Release" 654 android_configuration_name = "Release"
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 if (invoker.native_libs != []) { 1278 if (invoker.native_libs != []) {
1266 _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) 1279 _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir)
1267 args += [ "--native-libs=$_rebased_native_libs" ] 1280 args += [ "--native-libs=$_rebased_native_libs" ]
1268 } 1281 }
1269 if (defined(invoker.native_libs_filearg)) { 1282 if (defined(invoker.native_libs_filearg)) {
1270 args += [ "--native-libs=${invoker.native_libs_filearg}" ] 1283 args += [ "--native-libs=${invoker.native_libs_filearg}" ]
1271 } 1284 }
1272 if (_native_lib_placeholders != []) { 1285 if (_native_lib_placeholders != []) {
1273 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ] 1286 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ]
1274 } 1287 }
1275 if (defined(invoker.secondary_native_libs) && 1288
1276 invoker.secondary_native_libs != []) { 1289 # TODO (michaelbai): Remove the secondary_native_libs variable.
1290 if (defined(invoker.secondary_abi_native_libs_filearg)) {
1291 assert(defined(android_app_secondary_abi))
1292 args += [
1293 "--secondary-native-libs=${invoker.secondary_abi_native_libs_filearg}" ,
1294 "--secondary-android-abi=$android_app_secondary_abi",
1295 ]
1296 } else if (defined(invoker.secondary_native_libs) &&
1297 invoker.secondary_native_libs != []) {
1277 assert(defined(android_app_secondary_abi)) 1298 assert(defined(android_app_secondary_abi))
1278 inputs += invoker.secondary_native_libs 1299 inputs += invoker.secondary_native_libs
1279 _secondary_native_libs = rebase_path(invoker.secondary_native_libs) 1300 _secondary_native_libs = rebase_path(invoker.secondary_native_libs)
1280 args += [ 1301 args += [
1281 "--secondary-native-libs=$_secondary_native_libs", 1302 "--secondary-native-libs=$_secondary_native_libs",
1282 "--secondary-android-abi=$android_app_secondary_abi", 1303 "--secondary-android-abi=$android_app_secondary_abi",
1283 ] 1304 ]
1284 } 1305 }
1285 1306
1286 if (defined(invoker.emma_instrument) && invoker.emma_instrument) { 1307 if (defined(invoker.emma_instrument) && invoker.emma_instrument) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 } 1612 }
1592 1613
1593 package_target = "${target_name}__package" 1614 package_target = "${target_name}__package"
1594 package_apk(package_target) { 1615 package_apk(package_target) {
1595 forward_variables_from(invoker, 1616 forward_variables_from(invoker,
1596 [ 1617 [
1597 "assets_build_config", 1618 "assets_build_config",
1598 "emma_instrument", 1619 "emma_instrument",
1599 "native_lib_placeholders", 1620 "native_lib_placeholders",
1600 "native_libs_filearg", 1621 "native_libs_filearg",
1622 "secondary_abi_native_libs_filearg",
1601 "secondary_native_libs", 1623 "secondary_native_libs",
1602 "uncompress_shared_libraries", 1624 "uncompress_shared_libraries",
1603 "write_asset_list", 1625 "write_asset_list",
1604 ]) 1626 ])
1605 deps = _deps + [ ":${_package_resources_target_name}" ] 1627 deps = _deps + [ ":${_package_resources_target_name}" ]
1606 native_libs = _native_libs + _native_libs_even_when_incremental 1628 native_libs = _native_libs + _native_libs_even_when_incremental
1607 1629
1608 if (defined(_dex_path)) { 1630 if (defined(_dex_path)) {
1609 dex_path = _dex_path 1631 dex_path = _dex_path
1610 } 1632 }
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2633 2655
2634 script = "//build/android/gyp/generate_split_manifest.py" 2656 script = "//build/android/gyp/generate_split_manifest.py"
2635 outputs = [ 2657 outputs = [
2636 invoker.out_manifest, 2658 invoker.out_manifest,
2637 ] 2659 ]
2638 inputs = [ 2660 inputs = [
2639 invoker.main_manifest, 2661 invoker.main_manifest,
2640 ] 2662 ]
2641 } 2663 }
2642 } 2664 }
2665
2666 template("pack_relocation_section") {
2667 assert(defined(invoker.file_list_json))
2668 assert(defined(invoker.libraries_filearg))
2669 action(target_name) {
2670 forward_variables_from(invoker,
2671 [
2672 "deps",
2673 "public_deps",
2674 "inputs",
2675 "testonly",
2676 ])
2677 script = "//build/android/gyp/pack_relocations.py"
2678 depfile = "$target_gen_dir/$target_name.d"
2679 _packed_libraries_dir = "$target_gen_dir/$target_name/packed-libs"
2680 outputs = [
2681 invoker.file_list_json,
2682 ]
2683 deps += [ relocation_packer_target ]
2684
2685 args = [
2686 "--depfile",
2687 rebase_path(depfile, root_build_dir),
2688 "--enable-packing=1",
2689 "--android-pack-relocations",
2690 rebase_path(relocation_packer_exe, root_build_dir),
2691 "--stripped-libraries-dir",
2692 rebase_path(root_build_dir, root_build_dir),
2693 "--packed-libraries-dir",
2694 rebase_path(_packed_libraries_dir, root_build_dir),
2695 "--libraries=${invoker.libraries_filearg}",
2696 "--filelistjson",
2697 rebase_path(invoker.file_list_json, root_build_dir),
2698 ]
2699 }
2700 }
2643 } 2701 }
OLDNEW
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698