Closed Bug 1195477 Opened 7 years ago Closed 6 years ago

pass -fno-integrated-as where appropriate for clang-on-ARM


(Firefox Build System :: General, defect)

Not set


(firefox50 fixed)

Tracking Status
firefox50 --- fixed


(Reporter: froydnj, Assigned: froydnj)




(2 files)

We have this great bit of code in

but we don't seem to be using it anywhere.  It is needed, though, in a number of places (pixman, skia, ctypes, openmax, etc.), because a lot of asm takes advantage of GNU as features.  And clang's integrated assembler doesn't support those features.

So, the question is, should we:

1) find all the places that choke with the integrated assembler, and add -fno-integrated-as as appropriate; or
2) (the hammer) always use -fno-integrated-as when compiling with clang on ARM?

I like #1, personally, even if it winds up being more code, because we only slow down the places that need to be slowed down.  WDYT?
Flags: needinfo?(mh+mozilla)
I'd vote for #1.
Flags: needinfo?(mh+mozilla)
I assume this is why I had to hack around so much assembly for my iOS port. It'd be nice if we did the right thing somehow so we didn't have to have one-off workarounds.
A clang build doesn't compile everything yet, but I spot-checked things and I
believe these are the only places we need to care about.
Attachment #8759670 - Flags: review?(mh+mozilla)
The ARM assembly sources in libffi don't work well with clang's
integrated assembler, so disable the integrated assembler for libffi.
Attachment #8759671 - Flags: review?(mh+mozilla)
Assignee: nobody → nfroyd
Comment on attachment 8759670 [details] [diff] [review]
part 1 - use -fno-integrated-as for clang builds on ARM, changes

Review of attachment 8759670 [details] [diff] [review]:

::: gfx/cairo/libpixman/src/
@@ +25,5 @@
>              'pixman-arm-simd-asm.S',
>          ]
> +    if CONFIG['CLANG_CXX']:
> +        ASFLAGS += [
> +            '-fno-integrated-as',

I don't have a strong opinion here, but it looks like the documented flag is -no-integrated-as (without a f), although both work. FWIW, we're already using -no-integrated-as in security/nss/lib/freebl/Makefile (so, it's actually third-party-ish)
Attachment #8759670 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8759671 [details] [diff] [review]
part 2 - pass -fno-integrated-as to libffi when building with clang

Review of attachment 8759671 [details] [diff] [review]:

Same remark as the other patch.
Attachment #8759671 - Flags: review?(mh+mozilla) → review+
Pushed by
part 1 - use -no-integrated-as for clang builds on ARM, changes; r=glandium
part 2 - pass -no-integrated-as to libffi when building with clang; r=glandium
We intermittently hit a couple of failures, and and then the failure rate started to steeply climb, so I thought I'd see if that meant you needed a clobber. Clobbered and retriggered on your push, and got so I figured that meant that you only succeeded without a clobber, and failed entirely with. Clobbered again, and backed out in
Pushed by
part 1 - use -no-integrated-as for clang builds on ARM, changes; r=glandium
part 2 - pass -no-integrated-as to libffi when building with clang; r=glandium
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.