Revert "Reland: [Android JNI] Generate calls to RegisterNatives()"
This reverts commit 5510546e55d45b802b20c9b67a7f2de010602e47. Reason for revert: Breaks compile for non-arm official builds Original change's description: > Reland: [Android JNI] Generate calls to RegisterNatives() > > Reverted in: Ibbb98c136baaf016a9b26b3e614ca96e8a408c41 > > Reason for reland: Selective JNI registration is fixed by: > If97814bc5d79cfaa0211e46f785dbab329429d22 > > There is no change on this CL since reverted. > > TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org > > Bug: 683256 > Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester > Change-Id: Ibdb983b4ba07cf7e2b23a4c1706213175acfa7bf > Reviewed-on: https://chromium-review.googlesource.com/553157 > Reviewed-by: Andrew Grieve <agrieve@chromium.org> > Commit-Queue: Yipeng Wang <yipengw@chromium.org> > Cr-Commit-Position: refs/heads/master@{#483150} TBR=agrieve@chromium.org,yipengw@chromium.org Change-Id: Ibb4a5203f3811cf26fa13d8684a849278b4c316f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 683256 Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester Reviewed-on: https://chromium-review.googlesource.com/555711 Reviewed-by: Andrew Grieve <agrieve@chromium.org> Commit-Queue: Andrew Grieve <agrieve@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#483370} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 4a0bb5d2a1c1169821bffadd4b89f171285e3b95
This commit is contained in:
Родитель
c5c2b92b74
Коммит
e739153a95
|
@ -211,7 +211,7 @@ class _ProjectEntry(object):
|
|||
|
||||
def JavaFiles(self):
|
||||
if self._java_files is None:
|
||||
java_sources_file = self.DepsInfo().get('java_sources_file')
|
||||
java_sources_file = self.Gradle().get('java_sources_file')
|
||||
java_files = []
|
||||
if java_sources_file:
|
||||
java_sources_file = _RebasePath(java_sources_file)
|
||||
|
|
|
@ -413,7 +413,7 @@ def main(argv):
|
|||
gradle['android_manifest'] = options.android_manifest
|
||||
if options.type in ('java_binary', 'java_library', 'android_apk'):
|
||||
if options.java_sources_file:
|
||||
deps_info['java_sources_file'] = options.java_sources_file
|
||||
gradle['java_sources_file'] = options.java_sources_file
|
||||
if options.bundled_srcjars:
|
||||
gradle['bundled_srcjars'] = (
|
||||
build_utils.ParseGnList(options.bundled_srcjars))
|
||||
|
@ -436,14 +436,6 @@ def main(argv):
|
|||
gradle['dependent_java_projects'].append(c['path'])
|
||||
|
||||
|
||||
if options.type == 'android_apk':
|
||||
config['jni'] = {}
|
||||
all_java_sources = [c['java_sources_file'] for c in all_library_deps
|
||||
if 'java_sources_file' in c]
|
||||
if options.java_sources_file:
|
||||
all_java_sources.append(options.java_sources_file)
|
||||
config['jni']['all_source'] = all_java_sources
|
||||
|
||||
if (options.type in ('java_binary', 'java_library')):
|
||||
deps_info['requires_android'] = options.requires_android
|
||||
deps_info['supports_android'] = options.supports_android
|
||||
|
|
|
@ -192,6 +192,7 @@ if (enable_java_templates) {
|
|||
"--depfile",
|
||||
rebase_path(depfile, root_build_dir),
|
||||
"--input_file={{source}}",
|
||||
"--optimize_generation=1",
|
||||
"--ptr_type=long",
|
||||
"--output_dir",
|
||||
rebase_path(jni_output_dir, root_build_dir),
|
||||
|
@ -301,6 +302,7 @@ if (enable_java_templates) {
|
|||
rebase_path(jar_file, root_build_dir),
|
||||
"--input_file",
|
||||
class,
|
||||
"--optimize_generation=1",
|
||||
"--ptr_type=long",
|
||||
"--output_dir",
|
||||
rebase_path(jni_output_dir, root_build_dir),
|
||||
|
@ -332,61 +334,6 @@ if (enable_java_templates) {
|
|||
}
|
||||
}
|
||||
|
||||
# Declare a jni registration target.
|
||||
#
|
||||
# This target generates a header file calling JNI registration functions
|
||||
# created by generate_jni and generate_jar_jni.
|
||||
#
|
||||
# See base/android/jni_generator/jni_registration_generator.py for more info
|
||||
# about the format of the header file.
|
||||
#
|
||||
# Variables
|
||||
# target: The Apk target to generate registrations for.
|
||||
# output: Path to the generated .h file.
|
||||
# exception_files: List of .java files that should be ignored when searching
|
||||
# for native methods. (optional)
|
||||
#
|
||||
# Example
|
||||
# generate_jni_registration("chrome_jni_registration") {
|
||||
# target = ":chrome_public_apk"
|
||||
# output = "$root_gen_dir/chrome/browser/android/${target_name}.h"
|
||||
# exception_files = [
|
||||
# "//base/android/java/src/org/chromium/base/library_loader/LegacyLinker.java",
|
||||
# "//base/android/java/src/org/chromium/base/library_loader/Linker.java",
|
||||
# "//base/android/java/src/org/chromium/base/library_loader/ModernLinker.java",
|
||||
# ]
|
||||
# }
|
||||
template("generate_jni_registration") {
|
||||
action(target_name) {
|
||||
forward_variables_from(invoker, [ "testonly" ])
|
||||
_build_config = get_label_info(invoker.target, "target_gen_dir") + "/" +
|
||||
get_label_info(invoker.target, "name") + ".build_config"
|
||||
_rebased_build_config = rebase_path(_build_config, root_build_dir)
|
||||
|
||||
_rebase_exception_java_files =
|
||||
rebase_path(invoker.exception_files, root_build_dir)
|
||||
|
||||
script = "//base/android/jni_generator/jni_registration_generator.py"
|
||||
deps = [
|
||||
"${invoker.target}__build_config",
|
||||
]
|
||||
inputs = [
|
||||
_build_config,
|
||||
]
|
||||
outputs = [
|
||||
invoker.output,
|
||||
]
|
||||
|
||||
args = [
|
||||
# This is a list of .sources files.
|
||||
"--sources_files=@FileArg($_rebased_build_config:jni:all_source)",
|
||||
"--output",
|
||||
rebase_path(invoker.output, root_build_dir),
|
||||
"--no_register_java=$_rebase_exception_java_files",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# Declare a target for c-preprocessor-generated java files
|
||||
#
|
||||
# NOTE: For generating Java conterparts to enums prefer using the java_cpp_enum
|
||||
|
|
Загрузка…
Ссылка в новой задаче