diff options
author | Rumou Duan <rduan@google.com> | 2017-03-24 17:12:25 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2017-03-27 11:35:38 +0000 |
commit | 6773c15f16813a932d00cbcc93862076a2f24d3f (patch) | |
tree | 4efd740df0d2e910cd0c396944f9412452f1b496 /tools/j2objc/j2objc_wrapper.py | |
parent | ab10f47891d2045fc6c902de0ac33ed24c01a01d (diff) |
Add a script to generate the Java-class-to-objc-header mapping for J2ObjC. Previously the mapping is generated directly by J2ObjC through j2objc_wrapper.py.
RELNOTES:None.
--
PiperOrigin-RevId: 151138711
MOS_MIGRATED_REVID=151138711
Diffstat (limited to 'tools/j2objc/j2objc_wrapper.py')
-rwxr-xr-x | tools/j2objc/j2objc_wrapper.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/j2objc/j2objc_wrapper.py b/tools/j2objc/j2objc_wrapper.py index 1c55d7e4fc..1c97b296ec 100755 --- a/tools/j2objc/j2objc_wrapper.py +++ b/tools/j2objc/j2objc_wrapper.py @@ -484,6 +484,14 @@ def main(): # Run J2ObjC over the normal input Java files and unzipped gen jar Java files. # The output is stored in a temporary directory. tmp_objc_file_root = tempfile.mkdtemp() + + # If we do not generate the header mapping from J2ObjC, we still + # need to specify --output-header-mapping, as it signals to J2ObjC that we + # are using source paths as import paths, not package paths. + # TODO(rduan): Make another flag in J2ObjC to specify using source paths. + if '--output-header-mapping' not in j2objc_flags: + j2objc_flags.extend(['--output-header-mapping', '/dev/null']) + RunJ2ObjC(args.java, args.jvm_flags, args.j2objc, |