Closed Bug 1557229 Opened 4 months ago Closed 4 months ago

[armhf] LLVM ERROR: ran out of registers during register allocation while building hyper

Categories

(Firefox Build System :: General: Unsupported Platforms, defect)

defect
Not set

Tracking

(firefox68 fixed, firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox68 --- fixed
firefox69 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

When enabling neon (--with-fpu=neon, or when the C++ compiler defaults
to use neon), we pass +neon as a target feature to the rust compiler.
That enables neon in rust, which is the default with the
thumbv7neon-linux-gnueabihf rust target, but not the default for the
armv7-unknown-linux-gnueabihf rust target.

ARM processors may have various different FPUs, with different number of
registers. On ARMv7, there are FPUs with 16 registers and FPUs with 32
registers. NEON requires 32 registers.

Because the common denominator for ARMv7 is 16 registers, the
armv7-unknown-linux-gnueabihf rust target defaults to 16 registers,
although by enabling neon, we're guaranteed the processor will have 32.

But while the rust compiler keeps limited to 16 registers, it also hits
a wall while compiling the hyper crate, where it finds it doesn't have
enough registers (which in itself can be considered a bug).

Since enabling neon means there are 32 registers available, it makes
sense to tell the compiler to lift the restricted use of FPU registers,
and that's what the -d16 target feature does.

That's the default for the thumbv7neon-linux-gnueabihf rust target, so
nothing is changed, there, and fixes things for the
armv7-unknown-linux-gnueabihf rust target.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/f257594fa294
Add `-d16` as a target_feature along `+neon` for rust code. r=nalexander

Comment on attachment 9070170 [details]
Bug 1557229 - Add -d16 as a target_feature along +neon for rust code.

Beta/Release Uplift Approval Request

  • User impact if declined: Build failure in some armhf Linux configurations. Would be nice to fix in ESR68 for downstreams.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Practically speaking, this is a noop on mozilla.org builds.
  • String changes made/needed:
Attachment #9070170 - Flags: approval-mozilla-beta?
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Comment on attachment 9070170 [details]
Bug 1557229 - Add -d16 as a target_feature along +neon for rust code.

arm build fix, approved for 68.0b9

Attachment #9070170 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.