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

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

Issue 2319273002: Make secondary abi work for component build (Closed)
Patch Set: add missing dep 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/09 09:00:44 Unconditionally importing things outside of //buil
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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 if (invoker.native_libs != []) { 1277 if (invoker.native_libs != []) {
1266 _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) 1278 _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir)
1267 args += [ "--native-libs=$_rebased_native_libs" ] 1279 args += [ "--native-libs=$_rebased_native_libs" ]
1268 } 1280 }
1269 if (defined(invoker.native_libs_filearg)) { 1281 if (defined(invoker.native_libs_filearg)) {
1270 args += [ "--native-libs=${invoker.native_libs_filearg}" ] 1282 args += [ "--native-libs=${invoker.native_libs_filearg}" ]
1271 } 1283 }
1272 if (_native_lib_placeholders != []) { 1284 if (_native_lib_placeholders != []) {
1273 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ] 1285 args += [ "--native-lib-placeholders=$_native_lib_placeholders" ]
1274 } 1286 }
1275 if (defined(invoker.secondary_native_libs) && 1287
1276 invoker.secondary_native_libs != []) { 1288 # TODO (michaelbai): Remove the secondary_native_libs variable.
1289 if (defined(invoker.secondary_abi_native_libs_filearg)) {
1290 assert(defined(android_app_secondary_abi))
1291 args += [
1292 "--secondary-native-libs=${invoker.secondary_abi_native_libs_filearg}" ,
1293 "--secondary-android-abi=$android_app_secondary_abi",
1294 ]
1295 } else if (defined(invoker.secondary_native_libs) &&
1296 invoker.secondary_native_libs != []) {
1277 assert(defined(android_app_secondary_abi)) 1297 assert(defined(android_app_secondary_abi))
1278 inputs += invoker.secondary_native_libs 1298 inputs += invoker.secondary_native_libs
1279 _secondary_native_libs = rebase_path(invoker.secondary_native_libs) 1299 _secondary_native_libs = rebase_path(invoker.secondary_native_libs)
1280 args += [ 1300 args += [
1281 "--secondary-native-libs=$_secondary_native_libs", 1301 "--secondary-native-libs=$_secondary_native_libs",
1282 "--secondary-android-abi=$android_app_secondary_abi", 1302 "--secondary-android-abi=$android_app_secondary_abi",
1283 ] 1303 ]
1284 } 1304 }
1285 1305
1286 if (defined(invoker.emma_instrument) && invoker.emma_instrument) { 1306 if (defined(invoker.emma_instrument) && invoker.emma_instrument) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 } 1611 }
1592 1612
1593 package_target = "${target_name}__package" 1613 package_target = "${target_name}__package"
1594 package_apk(package_target) { 1614 package_apk(package_target) {
1595 forward_variables_from(invoker, 1615 forward_variables_from(invoker,
1596 [ 1616 [
1597 "assets_build_config", 1617 "assets_build_config",
1598 "emma_instrument", 1618 "emma_instrument",
1599 "native_lib_placeholders", 1619 "native_lib_placeholders",
1600 "native_libs_filearg", 1620 "native_libs_filearg",
1621 "secondary_abi_native_libs_filearg",
1601 "secondary_native_libs", 1622 "secondary_native_libs",
1602 "uncompress_shared_libraries", 1623 "uncompress_shared_libraries",
1603 "write_asset_list", 1624 "write_asset_list",
1604 ]) 1625 ])
1605 deps = _deps + [ ":${_package_resources_target_name}" ] 1626 deps = _deps + [ ":${_package_resources_target_name}" ]
1606 native_libs = _native_libs + _native_libs_even_when_incremental 1627 native_libs = _native_libs + _native_libs_even_when_incremental
1607 1628
1608 if (defined(_dex_path)) { 1629 if (defined(_dex_path)) {
1609 dex_path = _dex_path 1630 dex_path = _dex_path
1610 } 1631 }
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 script = "//build/android/gyp/generate_split_manifest.py" 2655 script = "//build/android/gyp/generate_split_manifest.py"
2635 outputs = [ 2656 outputs = [
2636 invoker.out_manifest, 2657 invoker.out_manifest,
2637 ] 2658 ]
2638 inputs = [ 2659 inputs = [
2639 invoker.main_manifest, 2660 invoker.main_manifest,
2640 ] 2661 ]
2641 } 2662 }
2642 } 2663 }
2643 } 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 }
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