Skip to content

Commit

Permalink
[clang][riscv] add -menable-experimental-extensions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
travisg committed Apr 8, 2024
1 parent 03eb343 commit 37c3228
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion engine.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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))
Expand Down

0 comments on commit 37c3228

Please sign in to comment.