Test for riscv_vector before calling __riscv_vsetvlmax_e8m1

This was causing a build failure if riscv_vector was not available
on the system.
This commit is contained in:
Gurjant Kalsi 2023-08-16 16:43:56 +00:00
parent 3da085e558
commit 3f70de0cb7
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ x86_cpu_info (FLAC__CPUInfo *info)
static void
rv64_cpu_info(FLAC__CPUInfo *info)
{
#if defined(FLAC__CPU_RISCV64) && defined(FLAC__HAS_RISCVINTRIN) && defined(FLAC__HAS_RISCVINTRIN) && !defined(FLAC__NO_ASM) && defined(HAVE_SYS_AUXV_H)
#if defined(FLAC__CPU_RISCV64) && defined(FLAC__HAS_RISCVINTRIN) && defined(FLAC__HAS_RISCVINTRIN) && !defined(FLAC__NO_ASM) && defined(HAVE_SYS_AUXV_H) && defined(FLAC__RISCV_VECTOR)
#define ISA_V_HWCAP (1 << ('v' - 'a'))
// Check that the kernel and the hardware support RiscV Vector.
unsigned long hw_cap = getauxval(AT_HWCAP);