mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
c29630f6ae
commit
767eb75662
@ -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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user