Skip x64 asm objects for non-x86_64 builds#2123
Open
carlosqwqqwq wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
rtpenginealready has conservative non-x86_64fallbacks in its codec and mixing code, but the build system still unconditionally adds severalx64assembly objects tolibanddaemon.For
riscv64, that means the source-level generic path exists, but the makefile plan still tries to carrymix_in_x64_*andmvr2s_x64_*objects into the build.This patch keeps the existing
x86_64fast path intact and only makes the object selection follow the compiler target architecture.What changed
lib/Makefile:$(CC) -dumpmachine;mix_in_x64_*andmvr2s_x64_*assembly objects when the target architecture isx86_64.daemon/Makefile:x64assembly objects when the target architecture isx86_64.Verification
lib/codeclib.candlib/mix_buffer.calready keep x86-specific SIMD dispatch behind__x86_64__guards and provide generic fallbacks elsewhere.ubuntu:24.04) withmake -pn:gcc,lib/Makefilestill reportsCC_ARCH := x86_64and keepsASM := mix_in_x64_* mvr2s_x64_*;gcc,daemon/Makefilestill reportsCC_ARCH := x86_64and keepsLIBASM := mvr2s_x64_* mix_in_x64_*;CC=riscv64-linux-gnu-gcc,lib/MakefilereportsCC_ARCH := riscv64and no longer includes anymix_in_x64_*ormvr2s_x64_*assembly objects;CC=riscv64-linux-gnu-gcc,daemon/MakefilereportsCC_ARCH := riscv64and no longer includes anyx64assembly objects;make -pnoutputs confirmed nomix_in_x64ormvr2s_x64objects remain in theriscv64build plan.daemon/Makefilerules in Docker (ubuntu:24.04) with a fake compiler harness:riscv64-unknown-linux-gnu, thertpenginetarget builds without touching anymix_in_x64_*ormvr2s_x64_*assembly objects;x86_64-linux-gnu, thertpenginetarget still compilesmvr2s_x64_avx2.S,mvr2s_x64_avx512.S,mix_in_x64_avx2.S,mix_in_x64_avx512bw.S, andmix_in_x64_sse2.S;Notes
x86_64targets from inheritingx64assembly objects when the generic C path is already the correct fallback.