From ff587b996a00e5d321d0a9f46ef439c1b8c755c0 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 26 Jun 2025 15:27:46 +0200 Subject: [PATCH] [libc] Fix the risc-v half precison float feature check This is a follow-up to #145169, which would break compiles when __riscv_zfhmin is not defined. --- libc/src/__support/macros/properties/cpu_features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/src/__support/macros/properties/cpu_features.h b/libc/src/__support/macros/properties/cpu_features.h index 457a2b7869d40..cdb2df97b2b9a 100644 --- a/libc/src/__support/macros/properties/cpu_features.h +++ b/libc/src/__support/macros/properties/cpu_features.h @@ -61,7 +61,7 @@ #if defined(__riscv_flen) // https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc -#if (__riscv_arch_test && __riscv_zfhmin) +#if defined(__riscv_zfhmin) #define LIBC_TARGET_CPU_HAS_RISCV_FPU_HALF #define LIBC_TARGET_CPU_HAS_FPU_HALF #endif // LIBC_TARGET_CPU_HAS_RISCV_FPU_HALF