Closed Bug 1692940 Opened 3 years ago Closed 3 years ago

Switch from yasm to nasm

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(11 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The last release of yasm was in 2014, and in most cases, we also require nasm on platforms where we require yasm. At the same time, we pass flags to yasm that make it take nasm syntax as input, so practically speaking, nasm can be used to replace yasm in a fairly straightforward manner. So instead of relying on two different assemblers, one of which is abandoned, rely on just one.

(This is also not a case of yasm being "finished" rather than abandoned. There are new instruction sets that yasm doesn't support but nasm does)

Depends on: 1692945
Depends on: 1693215
Blocks: 1693234

Note: even with bug 1693242 addressed, nasm is slower than yasm, but it also does (slightly) more work, such as using mov 42, %eax instead of mov 42, %rax (they do the same thing in practice (mov of 32-bits values in a 64-bits register clears the top-half of the 64-bits register) but encode in less bytes)

Back when bug 1508419 landed, we weren't using a bootstrapped nasm. It
is less useful now that we are.

Instead of preemptively check for it, and then check if it's good enough to
build AV1, only check for (and bootstrap) nasm when building AV1 requires
it.

At the same time, we future-proof the code to be able to handle multiple
things requiring nasm, which we're going to add shortly.

We're going to remove arguments to the function, and eventually remove
it.

We also remove the dependency on the check for GNU as, because all the
build environments we support for arm use GNU as, and the dependency
causes complications.

nasm doesn't like compiling simple_idct10.asm on x86
(https://bugzilla.nasm.us/show_bug.cgi?id=3392738), which is empty once
preprocessed for x86, so exclude it there.

nasm doesn't like compiling x86_abi_support.asm
(https://bugzilla.nasm.us/show_bug.cgi?id=3392738), which is actually an
include file, rather than a source file, so it shouldn't have been in
the list of sources in the first place (libvpx has a similar file that
is excluded already, for instance).

I was considering updating the vendoring script, but it turns out it
doesn't produce the current contents in-tree (which even breaks the
build), and aom is set to be removed (bug 1635296)...

We keep it in the Ubuntu image because that would mean rebuilding it,
which breaks things.

Depends on: 1693498
Blocks: 1693689
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/8b391b7adca2
Revert bug 1508419. r=firefox-build-system-reviewers,andi,dmajor
https://hg.mozilla.org/integration/autoland/rev/a22f5d28effb
Change the logic to check for nasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/157125c6c140
Remove test case for yasm version validation. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/2d3e201b3724
Switch vpx build to nasm instead of yasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/2d78e4bc3367
Switch jpeg build to nasm instead of yasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/da0ee340f699
Switch ffvpx build to nasm instead of yasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/3b1e09a1e421
Switch aom build to nasm instead of yasm. r=firefox-build-system-reviewers,jbauman,dmajor,andi
https://hg.mozilla.org/integration/autoland/rev/d74f2f0996f9
Turn the USE_YASM unit test into a USE_NAME one. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/fdba4b86b00a
Remove build system support for yasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/2310bd4635a2
Don't bootstrap yasm. r=firefox-build-system-reviewers,dmajor
https://hg.mozilla.org/integration/autoland/rev/001f6152928a
Don't install yasm in docker images. r=firefox-build-system-reviewers,andi,dmajor
Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/07420cd09432
Fix bustages on Win 2012 AArch64. a=bustage-fix
Blocks: 1694889
You need to log in before you can comment on or make changes to this bug.