Skip to content

build: only build huf_decompress_amd64.S on x86_64 - #4898

Open
brad0 wants to merge 2 commits into
meta:devfrom
brad0:build_amd64_asm
Open

brad0 wants to merge 2 commits into
meta:devfrom
brad0:build_amd64_asm

Conversation

@brad0

@brad0 brad0 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The Make and Meson builds add the x86_64 Huffman decoder assembly
source to every build, whatever the target CPU. Match the CMake build
and only build it when targeting x86_64, otherwise explicitly disable
assembly.

For Make, ask the compiler whether it targets x86_64, rather than
using uname, so cross-compiling and -m32 builds are handled. For
Meson, check the host machine's CPU family.

Checklist

  • I searched open pull requests and issues: this problem is not already being addressed.
  • Bug fix: it comes with a reproducer or a test that fails without the fix.
  • Performance change: numbers from repeated runs are included, with CPU, compiler, flags and data.
    A gain in one configuration is not a general gain: see the Performance section of CONTRIBUTING.md.
  • I stated below whether AI or other automated tools were used.

Tools used

AI usage: I took a look at the 3 build systems to assess the situation. Claude Opus figured out
the Meson and GNU Make bits for the architecture checks.

The Make and Meson builds add the x86_64 Huffman decoder assembly
source to every build, whatever the target CPU. Match the CMake build
and only build it when targeting x86_64, otherwise explicitly disable
assembly.

For Make, ask the compiler whether it targets x86_64, rather than
using uname, so cross-compiling and -m32 builds are handled. For
Meson, check the host machine's CPU family.
@meta-cla meta-cla Bot added the CLA Signed label Nov 5, 2026
Now that the build systems only build the assembly source when
targeting x86_64, remove the aarch64 BTI/PAC GNU property note
which only existed for the empty object built on aarch64.

While here, #undef the DECODE_AND_GET_NEXT macro instead of the not
yet defined DECODE.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant