[clang][riscv] add -menable-experimental-extensions

When building with clang-13 the zba riscv extension triggers a build
failure unless this switch is set. Set it for now, though it appears to
not be necessary for clang 14 and above.

TODO: add a version check for clang for a series of switches set based
on version in engine.mk.
This commit is contained in:
Travis Geiselbrecht
2024-04-07 23:34:37 -07:00
parent 03eb343e52
commit 37c3228443

View File

@@ -220,7 +220,7 @@ ifeq ($(ARCH),arm64)
ifeq ($(call is_warning_flag_supported,-Wasm-operand-widths),yes)
ARCH_COMPILEFLAGS += -Wno-asm-operand-widths
endif
endif
endif # arm64
ifeq ($(ARCH),riscv)
# ld.lld does not support linker relaxations yet.
@@ -240,7 +240,13 @@ ifeq ($(COMPILER_TYPE),clang)
ARCH_COMPILEFLAGS += -fPIE -fdirect-access-external-data
endif
endif
ifeq ($(COMPILER_TYPE),clang)
# zba extension is reported as not supported on clang-13. Add this switch to squelch
# the failure. TODO: gate this on a version check.
ARCH_COMPILEFLAGS += -menable-experimental-extensions
endif
endif # riscv
$(info PROJECT = $(PROJECT))
$(info PLATFORM = $(PLATFORM))