diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 18:54:28 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 18:54:28 +0000 |
commit | 7298a336fd781b2f7e23d30dbb71cf1321629229 (patch) | |
tree | f3aaaba7d93b72308a2e2e6dae1ac52ca1268127 /base/android | |
parent | 779852d9e1b654ba3533b9a7719fb0e4352a7726 (diff) | |
download | chromium_src-7298a336fd781b2f7e23d30dbb71cf1321629229.zip chromium_src-7298a336fd781b2f7e23d30dbb71cf1321629229.tar.gz chromium_src-7298a336fd781b2f7e23d30dbb71cf1321629229.tar.bz2 |
Revert 139321 - JNI Generator: removes obsolete -p option.
Mac compile failed.
Following:
https://chromiumcodereview.appspot.com/10414057
We're unpacking the .class file directly from the .jar,
no need for a -p option anymore.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10448021
TBR=bulach@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10444064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android')
-rwxr-xr-x | base/android/jni_generator/jni_generator.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py index bf8b971..54a4510 100755 --- a/base/android/jni_generator/jni_generator.py +++ b/base/android/jni_generator/jni_generator.py @@ -906,10 +906,10 @@ def ExtractInputFiles(jar_file, input_files, out_dirs): return extracted_file_names -def GenerateJNIHeaders(input_files, output_files, namespace): +def GenerateJNIHeaders(input_files, output_files, use_javap, namespace): for i in xrange(len(input_files)): try: - if os.path.splitext(input_files[i])[1] == '.class': + if use_javap: jni_from_javap = JNIFromJavaP.CreateFromClass(input_files[i], namespace) output = jni_from_javap.GetContent() else: @@ -966,8 +966,11 @@ See SampleForTests.java for more details. ' half specify the header output files.') option_parser.add_option('-j', dest='jar_file', help='Extract the list of input files from' - ' a specified jar file.' - ' Uses javap to extract the methods from a' + ' a specified jar file.') + option_parser.add_option('-p', dest='javap_class', + action='store_true', + default=False, + help='Uses javap to extract the methods from a' ' pre-compiled class. Input files should point' ' to pre-compiled Java .class files.') option_parser.add_option('-n', dest='namespace', @@ -984,7 +987,8 @@ See SampleForTests.java for more details. # CheckFileNames guarantees same length for inputs and outputs out_dirs = map(os.path.dirname, output_files) input_files = ExtractInputFiles(options.jar_file, input_files, out_dirs) - GenerateJNIHeaders(input_files, output_files, options.namespace) + GenerateJNIHeaders(input_files, output_files, options.javap_class, + options.namespace) if __name__ == '__main__': |