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

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

Issue 2634563002: android_webview: support building a stub WebView. (Closed)
Patch Set: add comment Created 3 years, 11 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
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 # Do not add any imports to non-//build directories here. 5 # Do not add any imports to non-//build directories here.
6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in.
7 import("//build/config/android/config.gni") 7 import("//build/config/android/config.gni")
8 import("//build/config/android/internal_rules.gni") 8 import("//build/config/android/internal_rules.gni")
9 import("//build/config/compiler/compiler.gni") 9 import("//build/config/compiler/compiler.gni")
10 import("//build/config/dcheck_always_on.gni") 10 import("//build/config/dcheck_always_on.gni")
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 1526
1527 # The dependency that makes the chromium linker, if any is needed. 1527 # The dependency that makes the chromium linker, if any is needed.
1528 _native_libs_deps = [] 1528 _native_libs_deps = []
1529 _shared_libraries_is_valid = 1529 _shared_libraries_is_valid =
1530 defined(invoker.shared_libraries) && invoker.shared_libraries != [] 1530 defined(invoker.shared_libraries) && invoker.shared_libraries != []
1531 _secondary_abi_native_libs_deps = [] 1531 _secondary_abi_native_libs_deps = []
1532 assert(_secondary_abi_native_libs_deps == []) # mark as used. 1532 assert(_secondary_abi_native_libs_deps == []) # mark as used.
1533 _secondary_abi_shared_libraries_is_valid = 1533 _secondary_abi_shared_libraries_is_valid =
1534 defined(invoker.secondary_abi_shared_libraries) && 1534 defined(invoker.secondary_abi_shared_libraries) &&
1535 invoker.secondary_abi_shared_libraries != [] 1535 invoker.secondary_abi_shared_libraries != []
1536 _unpackaged_shared_libs = []
1537 if (defined(invoker.unpackaged_shared_libraries)) {
michaelbai 2017/01/18 22:59:21 Please update template description with this varia
Torne 2017/01/19 14:23:12 Added in my next version (not uploaded yet as I'm
1538 _unpackaged_shared_libs += invoker.unpackaged_shared_libraries
1539 }
1536 1540
1537 if (is_component_build || is_asan) { 1541 if (is_component_build || is_asan) {
1538 if (_shared_libraries_is_valid) { 1542 if (_shared_libraries_is_valid) {
1539 _native_libs_deps += [ "//build/android:cpplib_stripped" ] 1543 _native_libs_deps += [ "//build/android:cpplib_stripped" ]
1540 } 1544 }
1541 if (_secondary_abi_shared_libraries_is_valid) { 1545 if (_secondary_abi_shared_libraries_is_valid) {
1542 _secondary_abi_native_libs_deps += [ "//build/android:cpplib_stripped($a ndroid_secondary_abi_toolchain)" ] 1546 _secondary_abi_native_libs_deps += [ "//build/android:cpplib_stripped($a ndroid_secondary_abi_toolchain)" ]
1543 } 1547 }
1544 } 1548 }
1545 1549
1546 if (_shared_libraries_is_valid) { 1550 if (_shared_libraries_is_valid) {
1547 _native_libs_deps += invoker.shared_libraries 1551 _native_libs_deps += invoker.shared_libraries
1548 1552
1549 # To determine the filenames of all dependent shared libraries, write the 1553 # To determine the filenames of all dependent shared libraries, write the
1550 # runtime deps of |shared_libraries| to a file during "gn gen". 1554 # runtime deps of |shared_libraries| to a file during "gn gen".
1551 # write_build_config.py will then grep this file for *.so to obtain the 1555 # write_build_config.py will then grep this file for *.so to obtain the
1552 # complete list. 1556 # complete list.
1553 _runtime_deps_file = 1557 _runtime_deps_file =
1554 "$target_gen_dir/${_template_name}.native.runtimedeps" 1558 "$target_gen_dir/${_template_name}.native.runtimedeps"
1555 group("${_template_name}__runtime_deps") { 1559 group("${_template_name}__runtime_deps") {
1556 deps = _native_libs_deps 1560 deps = _native_libs_deps
1557 write_runtime_deps = _runtime_deps_file 1561 write_runtime_deps = _runtime_deps_file
1558 } 1562 }
1559
1560 _native_lib_version_rule = ""
1561 if (defined(invoker.native_lib_version_rule)) {
1562 _native_lib_version_rule = invoker.native_lib_version_rule
1563 }
1564 _native_lib_version_arg = "\"\""
1565 if (defined(invoker.native_lib_version_arg)) {
1566 _native_lib_version_arg = invoker.native_lib_version_arg
1567 }
1568 } 1563 }
1569 1564
1570 if (_secondary_abi_shared_libraries_is_valid) { 1565 if (_secondary_abi_shared_libraries_is_valid) {
1571 _secondary_abi_native_libs_deps += invoker.secondary_abi_shared_libraries 1566 _secondary_abi_native_libs_deps += invoker.secondary_abi_shared_libraries
1572 1567
1573 # To determine the filenames of all dependent shared libraries, write the 1568 # To determine the filenames of all dependent shared libraries, write the
1574 # runtime deps of |shared_libraries| to a file during "gn gen". 1569 # runtime deps of |shared_libraries| to a file during "gn gen".
1575 # write_build_config.py will then grep this file for *.so to obtain the 1570 # write_build_config.py will then grep this file for *.so to obtain the
1576 # complete list. 1571 # complete list.
1577 _secondary_abi_runtime_deps_file = 1572 _secondary_abi_runtime_deps_file =
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 proguard_file = _generated_proguard_config 1687 proguard_file = _generated_proguard_config
1693 1688
1694 build_config = _build_config 1689 build_config = _build_config
1695 deps = _android_manifest_deps + [ ":$build_config_target" ] 1690 deps = _android_manifest_deps + [ ":$build_config_target" ]
1696 if (defined(invoker.deps)) { 1691 if (defined(invoker.deps)) {
1697 deps += invoker.deps 1692 deps += invoker.deps
1698 } 1693 }
1699 } 1694 }
1700 _srcjar_deps += [ ":$process_resources_target" ] 1695 _srcjar_deps += [ ":$process_resources_target" ]
1701 1696
1702 if (_native_libs_deps != []) { 1697 if (_native_libs_deps != [] || _unpackaged_shared_libs != []) {
1698 _native_lib_version_rule = ""
1699 if (defined(invoker.native_lib_version_rule)) {
1700 _native_lib_version_rule = invoker.native_lib_version_rule
1701 }
1702 _native_lib_version_arg = "\"\""
1703 if (defined(invoker.native_lib_version_arg)) {
1704 _native_lib_version_arg = invoker.native_lib_version_arg
1705 }
1706
1703 _enable_chromium_linker_tests = false 1707 _enable_chromium_linker_tests = false
1704 if (defined(invoker.enable_chromium_linker_tests)) { 1708 if (defined(invoker.enable_chromium_linker_tests)) {
1705 _enable_chromium_linker_tests = invoker.enable_chromium_linker_tests 1709 _enable_chromium_linker_tests = invoker.enable_chromium_linker_tests
1706 } 1710 }
1707 _ordered_libraries_json = 1711 _ordered_libraries_json =
1708 "$target_gen_dir/$target_name.ordered_libararies.json" 1712 "$target_gen_dir/$target_name.ordered_libraries.json"
1709 _rebased_ordered_libraries_json = 1713 _rebased_ordered_libraries_json =
1710 rebase_path(_ordered_libraries_json, root_build_dir) 1714 rebase_path(_ordered_libraries_json, root_build_dir)
1711 _ordered_libraries_target = "${_template_name}__write_ordered_libraries" 1715 _ordered_libraries_target = "${_template_name}__write_ordered_libraries"
1712 1716
1713 # TODO(agrieve): Make GN write runtime deps in dependency order so as to 1717 # TODO(agrieve): Make GN write runtime deps in dependency order so as to
1714 # not need this manual sorting step. 1718 # not need this manual sorting step.
1715 action(_ordered_libraries_target) { 1719 action(_ordered_libraries_target) {
1716 script = "//build/android/gyp/write_ordered_libraries.py" 1720 script = "//build/android/gyp/write_ordered_libraries.py"
1721
1722 # Don't add _unpackaged_shared_libs to deps, because we don't actually
1723 # build those libraries at all.
1717 deps = _native_libs_deps + [ ":$build_config_target" ] 1724 deps = _native_libs_deps + [ ":$build_config_target" ]
1718 outputs = [ 1725 outputs = [
1719 _ordered_libraries_json, 1726 _ordered_libraries_json,
1720 ] 1727 ]
1721 _rebased_android_readelf = rebase_path(android_readelf, root_build_dir) 1728 _rebased_android_readelf = rebase_path(android_readelf, root_build_dir)
1722 args = [ 1729 args = [
1723 "--readelf=$_rebased_android_readelf", 1730 "--readelf=$_rebased_android_readelf",
1724 "--output=$_rebased_ordered_libraries_json", 1731 "--output=$_rebased_ordered_libraries_json",
1725 "--libraries-dir=.", 1732 "--libraries-dir=.",
1726 "--input-libraries=@FileArg($_rebased_build_config:native:libraries)", 1733 "--input-libraries=@FileArg($_rebased_build_config:native:libraries)",
1734 "--unpackaged-libraries=$_unpackaged_shared_libs",
1727 ] 1735 ]
1728 } 1736 }
1729 1737
1730 java_cpp_template("${_template_name}__native_libraries_java") { 1738 java_cpp_template("${_template_name}__native_libraries_java") {
1731 package_name = "org/chromium/base/library_loader" 1739 package_name = "org/chromium/base/library_loader"
1732 sources = [ 1740 sources = [
1733 "//base/android/java/templates/NativeLibraries.template", 1741 "//base/android/java/templates/NativeLibraries.template",
1734 ] 1742 ]
1735 inputs = [ 1743 inputs = [
1736 _ordered_libraries_json, 1744 _ordered_libraries_json,
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 # because in practice they seem to contain classes required to be in the 2840 # because in practice they seem to contain classes required to be in the
2833 # classpath. 2841 # classpath.
2834 deps += _subjar_targets 2842 deps += _subjar_targets
2835 } 2843 }
2836 if (defined(_res_target_name)) { 2844 if (defined(_res_target_name)) {
2837 deps += [ ":$_res_target_name" ] 2845 deps += [ ":$_res_target_name" ]
2838 } 2846 }
2839 } 2847 }
2840 } 2848 }
2841 } 2849 }
OLDNEW
« build/android/gyp/write_ordered_libraries.py ('K') | « build/android/gyp/write_ordered_libraries.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698