[clang][arm64] Disable -Wasm-operand-widths warning
Clang incorrectly diagnoses msr operations as need a 64-bit operand even if the underlying register is actually 32 bits. Silence this warning. There are quite a few occurrences of this warning so I opted to add the -Wno-flag instead of wrapping all callsites in `#pragma clang diagnostic ignored -Wasm-operand-widths`.
This commit is contained in:
committed by
Travis Geiselbrecht
parent
231f58903b
commit
923541d4c2
@@ -197,6 +197,15 @@ STRIP := $(TOOLCHAIN_PREFIX)strip
|
||||
ifeq ($(call is_warning_flag_supported,-Wnonnull-compare),yes)
|
||||
GLOBAL_COMPILEFLAGS += -Wno-nonnull-compare
|
||||
endif
|
||||
# Ideally we would move this check to arm64/rules.mk, but we can only check
|
||||
# for supported warning flags once CC is defined.
|
||||
ifeq ($(ARCH),arm64)
|
||||
# Clang incorrectly diagnoses msr operations as need a 64-bit operand even if
|
||||
# the underlying register is actually 32 bits. Silence this common warning.
|
||||
ifeq ($(call is_warning_flag_supported,-Wasm-operand-widths),yes)
|
||||
ARCH_COMPILEFLAGS += -Wno-asm-operand-widths
|
||||
endif
|
||||
endif
|
||||
|
||||
$(info PROJECT = $(PROJECT))
|
||||
$(info PLATFORM = $(PLATFORM))
|
||||
|
||||
Reference in New Issue
Block a user