Closed Bug 1281900 Opened 4 years ago Closed 2 months ago
[meta] Improve the JNI preprocessing build experience
Full disclosure: I don't really understand how this works and how it could be improved -- I just know it's pretty bad. If I understand correctly, the C++ code built during the compile tier requires some generated code and headers to build. We check that generated code into the tree and have a manual process to update it . The generated code is produced by build/annotationProcessors, although this is a white lie -- it's not actually a Java Annotation Processor, it's just a Java program that we run. That program processes the *compiled* Java JAR files; that is, it depends on having built the Java in mobile/android/base to complete. To improve this, we might: 1) build the Java code before the compiled C++ code, potentially by adding a java tier, alternately by compiling Java during the compile tier and adding some cross directory dependencies. 2) generate the source and header files automatically each build, without checking them into the tree. 3) profit. This is a fair amount of work. In the glorious future, we might make the annotation processing code a real Java Annotation Processor so that it fits into the Gradle build system smoothly, in which case we'd really want to build the Java first. One reason we might not want to do this: building the Java stuff is slow (1.5-2 minutes on my laptop) and largely serial. Anything that delays getting to the long and highly-parallel compile tier is bad news. Any other suggestions for improving this?  See https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile.in?q=path%3Amobile%2Fandroid%2Fbase%2FMakefile.in&redirect_type=single#561 and https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile.in?q=path%3Amobile%2Fandroid%2Fbase%2FMakefile.in&redirect_type=single#516.
Making this a meta ticket to track multiple pieces.
Component: General → Build Config & IDE Support
Product: Firefox Build System → Firefox for Android
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.