Skip to content

Conversation

@zmodem
Copy link
Collaborator

@zmodem zmodem commented Jun 26, 2025

This is a follow-up to #145169, which would break compiles when __riscv_zfhmin is not defined.

This is a follow-up to llvm#145169, which would break compiles when
__riscv_zfhmin is not defined.
@llvmbot
Copy link
Member

llvmbot commented Jun 26, 2025

@llvm/pr-subscribers-libc

Author: Hans Wennborg (zmodem)

Changes

This is a follow-up to #145169, which would break compiles when __riscv_zfhmin is not defined.


Full diff: https://github.com/llvm/llvm-project/pull/145894.diff

1 Files Affected:

  • (modified) libc/src/__support/macros/properties/cpu_features.h (+1-1)
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

Copy link
Member

@mikhailramalho mikhailramalho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zmodem zmodem merged commit 58b7d20 into llvm:main Jun 26, 2025
15 checks passed
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
This is a follow-up to llvm#145169, which would break compiles when
__riscv_zfhmin is not defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants