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

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

Issue 1236543004: GN (android): Append ".cr" to component .so's to avoid zygote lib collisions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn16
Patch Set: android_shared_library_extension -> android_product_extension (to match GYP) Created 5 years, 5 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/config.gni ('k') | build/toolchain/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("//base/android/linker/config.gni") 5 import("//base/android/linker/config.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/internal_rules.gni") 7 import("//build/config/android/internal_rules.gni")
8 import("//third_party/android_platform/config.gni") 8 import("//third_party/android_platform/config.gni")
9 import("//tools/grit/grit_rule.gni") 9 import("//tools/grit/grit_rule.gni")
10 10
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 } 1425 }
1426 1426
1427 _enable_relocation_packing = false 1427 _enable_relocation_packing = false
1428 if (defined(invoker.enable_relocation_packing) && 1428 if (defined(invoker.enable_relocation_packing) &&
1429 invoker.enable_relocation_packing) { 1429 invoker.enable_relocation_packing) {
1430 _enable_relocation_packing = relocation_packing_supported 1430 _enable_relocation_packing = relocation_packing_supported
1431 assert(_use_chromium_linker, 1431 assert(_use_chromium_linker,
1432 "Relocation packing requires use of the" + " Chromium linker.") 1432 "Relocation packing requires use of the" + " Chromium linker.")
1433 } 1433 }
1434 1434
1435 _native_libs = []
1436 if (is_component_build) { 1435 if (is_component_build) {
1437 _native_libs += [ "$root_out_dir/lib.stripped/libc++_shared.so" ] 1436 _native_libs += [ "$root_out_dir/lib.stripped/libc++_shared.so" ]
1438 _chromium_linker_dep += [ "//build/android:cpplib_stripped" ] 1437 _chromium_linker_dep += [ "//build/android:cpplib_stripped" ]
1439 } 1438 }
1439
1440 # Allow native_libs to be in the form "foo.so" or "foo.cr.so"
1441 _first_ext_removed =
1442 process_file_template(invoker.native_libs, "{{source_name_part}}")
1440 _native_libs += process_file_template( 1443 _native_libs += process_file_template(
1441 invoker.native_libs, 1444 _first_ext_removed,
1442 "$root_build_dir/lib.stripped/{{source_file_part}}") 1445 "$root_build_dir/lib.stripped/{{source_name_part}}$android_product_e xtension")
1443 1446
1444 _native_libs_dir = base_path + "/libs" 1447 _native_libs_dir = base_path + "/libs"
1445 1448
1446 if (_use_chromium_linker) { 1449 if (_use_chromium_linker) {
1447 _native_libs += 1450 _native_libs += [ "$root_build_dir/lib.stripped/libchromium_android_linker $android_product_extension" ]
1448 [ "$root_build_dir/lib.stripped/libchromium_android_linker.so" ]
1449 } 1451 }
1450 1452
1451 _enable_relocation_packing = false 1453 _enable_relocation_packing = false
1452 if (_use_chromium_linker && defined(invoker.enable_relocation_packing) && 1454 if (_use_chromium_linker && defined(invoker.enable_relocation_packing) &&
1453 invoker.enable_relocation_packing) { 1455 invoker.enable_relocation_packing) {
1454 _enable_relocation_packing = true 1456 _enable_relocation_packing = true
1455 } 1457 }
1456 1458
1457 _native_lib_version_rule = "" 1459 _native_lib_version_rule = ""
1458 if (defined(invoker.native_lib_version_rule)) { 1460 if (defined(invoker.native_lib_version_rule)) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 ] 1651 ]
1650 1652
1651 inputs = _native_libs 1653 inputs = _native_libs
1652 deps = _chromium_linker_dep 1654 deps = _chromium_linker_dep
1653 1655
1654 inputs += [ _build_config ] 1656 inputs += [ _build_config ]
1655 deps += [ ":$build_config_target" ] 1657 deps += [ ":$build_config_target" ]
1656 1658
1657 skip_packing_list = [ 1659 skip_packing_list = [
1658 "gdbserver", 1660 "gdbserver",
1659 "libchromium_android_linker.so", 1661 "libchromium_android_linker$android_product_extension",
1660 ] 1662 ]
1661 1663
1662 enable_packing_arg = 0 1664 enable_packing_arg = 0
1663 if (_enable_relocation_packing) { 1665 if (_enable_relocation_packing) {
1664 enable_packing_arg = 1 1666 enable_packing_arg = 1
1665 deps += [ relocation_packer_target ] 1667 deps += [ relocation_packer_target ]
1666 } 1668 }
1667 1669
1668 args = [ 1670 args = [
1669 "--depfile", 1671 "--depfile",
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 1935
1934 test_suite_name = get_label_info(invoker.unittests_dep, "name") 1936 test_suite_name = get_label_info(invoker.unittests_dep, "name")
1935 1937
1936 # This trivial assert is needed in case both unittests_binary and apk_name 1938 # This trivial assert is needed in case both unittests_binary and apk_name
1937 # are defined, as otherwise test_suite_name would not be used. 1939 # are defined, as otherwise test_suite_name would not be used.
1938 assert(test_suite_name != "") 1940 assert(test_suite_name != "")
1939 1941
1940 if (defined(invoker.unittests_binary)) { 1942 if (defined(invoker.unittests_binary)) {
1941 unittests_binary = invoker.unittests_binary 1943 unittests_binary = invoker.unittests_binary
1942 } else { 1944 } else {
1943 unittests_binary = "lib" + test_suite_name + ".so" 1945 unittests_binary = "lib${test_suite_name}${android_product_extension}"
1944 } 1946 }
1945 1947
1946 if (defined(invoker.apk_name)) { 1948 if (defined(invoker.apk_name)) {
1947 apk_name = invoker.apk_name 1949 apk_name = invoker.apk_name
1948 } else { 1950 } else {
1949 apk_name = test_suite_name 1951 apk_name = test_suite_name
1950 } 1952 }
1951 1953
1952 android_apk(target_name) { 1954 android_apk(target_name) {
1953 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" 1955 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 template("uiautomator_test") { 2220 template("uiautomator_test") {
2219 set_sources_assignment_filter([]) 2221 set_sources_assignment_filter([])
2220 if (defined(invoker.testonly)) { 2222 if (defined(invoker.testonly)) {
2221 testonly = invoker.testonly 2223 testonly = invoker.testonly
2222 } 2224 }
2223 assert(target_name != "") 2225 assert(target_name != "")
2224 assert(invoker.deps != [] || true) 2226 assert(invoker.deps != [] || true)
2225 group(target_name) { 2227 group(target_name) {
2226 } 2228 }
2227 } 2229 }
OLDNEW
« no previous file with comments | « build/config/android/config.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698