Closed Bug 1437201 Opened 2 years ago Closed 2 years ago

Ensure that |mach bootstrap --enable/application=mobile/android| builds correctly

Categories

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

enhancement
Not set

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Right now, Bug 1412983 requires setting HOST_{CC,CXX} in order to compile mobile/android.  We shouldn't require setting HOST* in this case; they should be deduced, like they would be for a non-cross-compile build.

However, even after fixing that issue, we find that llvm-config is not found.  That's because macOS includes clang but not llvm out of the box, and because |mach bootstrap| doesn't install llvm for mobile/android.  (It does for browser/).

This ticket tracks addressing these issues, so that |mach bootstrap --enable/application && mach build| Just Works out of the box.
Comment on attachment 8949890 [details]
Bug 1437201 - Part 2: Install llvm on macOS when bootstrapping mobile/android.

https://reviewboard.mozilla.org/r/219208/#review224968

::: commit-message-2a7ab:3
(Diff revision 1)
> +This was just an oversight when adding Stylo bindgen support to |mach
> +bootstrap| (I assume).

I think when it was added, we didn't really think about supporting Stylo for Android...I guess that counts as an oversight!
Attachment #8949890 - Flags: review?(nfroyd) → review+
Comment on attachment 8949889 [details]
Bug 1437201 - Part 1: Don't try to use target as host with clang for Android.

https://reviewboard.mozilla.org/r/219206/#review224970

Thank you!  I think I tried some variant of this and was not able to get it to work.  Do you want to try writing a toolchain test for this?
Attachment #8949889 - Flags: review?(nfroyd) → review+
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/04e61046bb44
Part 1: Don't try to use target as host with clang for Android. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/1a206d390b01
Part 2: Install llvm on macOS when bootstrapping mobile/android. r=froydnj
Comment on attachment 8950722 [details]
Bug 1437201 - Part 0: Use toolchain clang for host compiler on Android.

https://reviewboard.mozilla.org/r/219970/#review225786

This works for me, but I am completely ignorant about the question below.

::: mobile/android/config/mozconfigs/common:15
(Diff revision 1)
> -# GCC for the host compiler.  l10n builds are still special, however:
> -# they are run on older CentOS systems, and l10n builds on release are
> -# still run on Buildbot.  So we have to set things up so this mozconfig
> +# the host compiler.
> +HOST_CC="$topsrcdir/clang/bin/clang"
> +HOST_CXX="$topsrcdir/clang/bin/clang++"

Have we upgraded the l10n infrastructure sufficiently that this statement is a complete lie?
Attachment #8950722 - Flags: review?(nfroyd) → review+
l10n builds are no-compile, which include build/mozconfig.no-compile, which unsets those.
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55fff88d6d89
Part 0: Use toolchain clang for host compiler on Android. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/dbbea0d61dbe
Part 1: Don't try to use target as host with clang for Android. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/074032cf52d6
Part 2: Install llvm on macOS when bootstrapping mobile/android. r=froydnj
https://hg.mozilla.org/mozilla-central/rev/55fff88d6d89
https://hg.mozilla.org/mozilla-central/rev/dbbea0d61dbe
https://hg.mozilla.org/mozilla-central/rev/074032cf52d6
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Clearing NI since I relanded this.
Flags: needinfo?(nalexander)
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 60 → mozilla60
You need to log in before you can comment on or make changes to this bug.