gyro_fft: fix clang build error on Linux arm64

Extend the -Wno-asm-operand-widths workaround to include Linux aarch64
in addition to Apple Silicon. CMSIS DSP contains ARM Cortex-M specific
assembly that clang (but not gcc) warns about on 64-bit ARM platforms.

The assembly code is unused on POSIX builds - only the C fallback
implementations are executed in SITL.

This fixes clang-tidy CI failing on arm64 runners.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche 2026-02-04 18:44:03 +01:00
parent c29630f6ae
commit 767eb75662

View File

@ -38,8 +38,10 @@ if(${PX4_PLATFORM} MATCHES "NuttX")
add_compile_options(-DARM_MATH_DSP)
endif()
# Disable 32-bit assembly warnings on apple silicon. Triggered by unused code only.
if(${PX4_PLATFORM} MATCHES "posix" AND APPLE AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm64")
# Disable 32-bit assembly warnings on arm64 platforms (Apple Silicon, Linux aarch64).
# CMSIS DSP contains ARM Cortex-M assembly that triggers clang warnings on 64-bit ARM.
# This code is unused on POSIX platforms - only the C fallback implementations run.
if(${PX4_PLATFORM} MATCHES "posix" AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64")
add_compile_options(-Wno-asm-operand-widths)
endif()