Closed Bug 1523341 Opened 7 years ago Closed 7 years ago

Make `mach configure` determine full target triplet from partial information for mobile/android

Categories

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

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: nalexander, Assigned: glandium)

References

Details

Attachments

(1 file)

In tickets like Bug 1522354, glandium has been making "partial target triples" like "--target=aarch64" do The Right Thing for Windows on ARM64 devices. This ticket tracks making the following mappings:

--target={arm,armv7,armv7a} => --target=arm-linux-androideabi
--target={arm64,aarch64} => --target=aarch64-linux-android
--target={x86,i686} => --target=i686-linux-android
--target={x86_64} => --target=x86_64-linux-android

I imagine this will only be possible when --enable-application=mobile/android at first, unless we have some other indicator that we're targeting Android.

Note that I added some non-standard mappings (i.e., I don't think --target=arm64 is a natural way to ask for ARM64 on Android) -- if we can't support those, that's fine.

Summary: Make `mach configure` determine full target triplet from partial information → Make `mach configure` determine full target triplet from partial information for mobile/android

glandium: could you provide some hints about how to arrange this? And could you comment on the non-standard mappings: is that a bad idea?

Flags: needinfo?(mh+mozilla)

Also use armv7a as the default when no target is given at all.

Also change bootstrap to create a simpler mozconfig. The downside is
that the resulting mozconfig would not work when building older
revisions.

I didn't address the non-standard mappings. I don't have a strong opinion about x86 vs i686, but arm64 is definitely not going to work well. One of the reasons aarch64 is called aarch64 is that a lot of things have been relying on tests like .startswith('arm'), and would catch arm64 when they're not supposed to. That's true out there in the wild, and it's true in our own configure.

Making armv7a the default kind of works around having the answer the question wrt {arm,armv7,armv7a} because there's no need to give a target at all.

Flags: needinfo?(mh+mozilla)
Assignee: nobody → mh+mozilla
Depends on: 1522354
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/f59b1c114259 Allow to only pass the CPU to --target and get the right thing for Fennec builds. r=nalexander
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Depends on: 1525999
Depends on: 1526201
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 67 → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: