Closed Bug 1509573 Opened 5 years ago Closed 5 years ago

Invoke |mach build faster| and |make -C ... stage-package| directly from Gradle

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

enhancement
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 2 obsolete files)

Right now, we indirect through mobile/android/base/Makefile.in.  That's fine, but it's a layer of Makefile gunk that can be removed; and it's preventing some slight GV-specific optimizations (e.g., only invoking stage-package for GV when appropriate).
This is just an awkward feature of the FasterMake build system:
without a direct consumer, GENERATED_FILES aren't handled.  We
"consume" them into a dummy directory that isn't packaged.  Sadly, the
FasterMake generic rule doesn't handle relative directories smoothly,
so we have to special case that too.

Depends on D12795
This uses |mach build faster| rather than a custom target, reducing
Make magic and making it easier to reason about the Gradle build.  I
also took the opportunity to improve the task logging.

Depends on D12796
This will be used to make it very clear when certain tasks are being
skipped, as we move details about Gecko binaries to depend on the
Gradle task execution graph.

Depends on D12797
This splits the two stage-package invocations (which are rather slow)
between Fennec and GeckoView, hopefully speeding local GV development
up a little (in the IDE).

In addition, we feed the packaged libs (and asset libs) through.

Depends on D12798
Attachment #9027269 - Attachment description: Bug 1509573 - Part 1: Make |mach build faster| handle Android generated files. → Bug 1509573 - Part 1: Make |mach build faster| handle Android generated files. r?froydnj
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7e0661e34c2
Part 1: Make |mach build faster| handle Android generated files. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/36cf7b9ce095
Part 2: Use |mach build faster| rather than special Make target. r=snorp
https://hg.mozilla.org/integration/autoland/rev/059741f95cf4
Part 3: Extract shared `onlyIf` Gradle guard. r=snorp
https://hg.mozilla.org/integration/autoland/rev/ace2d2ada8ef
Part 4: Use |make -C ... stage-package| rather than special Make target. r=snorp
As discussed with :nalexander, this breaks local builds of android-x86 on a Linux host:

 0:00.23 /usr/bin/gmake -C /home/eitan/gecko/objdir-android-x86 -j8 -s backend
 0:00.31 /usr/bin/gmake -C faster -j8 -s
 0:00.35 gmake[1]: *** No rule to make target '/home/eitan/gecko/objdir-android-x86/i686-linux-android/release/libgkrust.a', needed by 'libxul.so'.  Stop.
 0:00.35 gmake: *** [/home/eitan/gecko/config/faster/rules.mk:81: /home/eitan/gecko/objdir-android-x86/toolkit/library/dependentlibs.list] Error 2
 0:00.35 gmake: *** Waiting for unfinished jobs....

 0:00.48 303 compiler warnings present.
Backed out for unexpected bustages.

Backout: https://hg.mozilla.org/mozilla-central/rev/ecb2818bcd055bc5381d0702c955ee78a64dc41c
Target Milestone: Firefox 65 → ---
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This was always an accident of history: we forced export tier without
avoiding it in the libs tier.
This was always an accident of history: we forced export tier without
avoiding it in the libs tier.
Attachment #9027271 - Attachment description: Bug 1509573 - Part 3: Extract shared `onlyIf` Gradle guard. r?snorp → Bug 1509573 - Part 1: Use |mach build ...| rather than special Make target. r=snorp,#firefox-build-system-reviewers
Attachment #9027269 - Attachment description: Bug 1509573 - Part 1: Make |mach build faster| handle Android generated files. r?froydnj → Bug 1509573 - Part 2: Make |mach build faster| handle Android generated files. r=froydnj
Attachment #9027272 - Attachment description: Bug 1509573 - Part 4: Use |make -C ... stage-package| rather than special Make target. r?snorp → Bug 1509573 - Part 3: Use |make -C ... stage-package| rather than special Make target. r=snorp
Attachment #9027270 - Attachment is obsolete: true
Attachment #9027271 - Attachment description: Bug 1509573 - Part 1: Use |mach build ...| rather than special Make target. r=snorp,#firefox-build-system-reviewers → Bug 1509573 - Part 1: Use |mach build ...| rather than special Make target. r=snorp
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ba198e2a59e
Part 0: Only compile Java via Gradle in export tier. r=chmanchester.mielczarek
https://hg.mozilla.org/integration/autoland/rev/43ddf4c3ae27
Part 1: Use |mach build ...| rather than special Make target. r=snorp
https://hg.mozilla.org/integration/autoland/rev/6fd3033d7cb7
Part 2: Make |mach build faster| handle Android generated files. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/c15860d7d189
Part 3: Use |make -C ... stage-package| rather than special Make target. r=snorp
Attachment #9032241 - Attachment is obsolete: true
Depends on: 1515282
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 66 → mozilla66
You need to log in before you can comment on or make changes to this bug.