[compiler-rt] [builtins] Remove check for header on Linux (PR #161751)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 16:21:17 PDT 2025
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/161751
Originally the code only checked for the existence of the header but it
was changed to also check for Linux so it would not be enabled on OpenBSD
and fail to build. OpenBSD support was enabled further up later on.
>From 8769385b813fb92cf1faf4898db265be5a08b041 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Thu, 2 Oct 2025 18:36:50 -0400
Subject: [PATCH] [builtins] Remove check for header on Linux
Originally the code only checked for the existence of the header but it
was changed to also check for Linux so it would not be enabled on OpenBSD
and fail to build. OpenBSD support was enabled further up later on.
---
compiler-rt/lib/builtins/cpu_model/aarch64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/builtins/cpu_model/aarch64.c b/compiler-rt/lib/builtins/cpu_model/aarch64.c
index 8af736d0ffe93..38fdb38bdf5ff 100644
--- a/compiler-rt/lib/builtins/cpu_model/aarch64.c
+++ b/compiler-rt/lib/builtins/cpu_model/aarch64.c
@@ -46,7 +46,7 @@ _Bool __aarch64_have_lse_atomics
#elif defined(__ANDROID__)
#include "aarch64/hwcap.inc"
#include "aarch64/lse_atomics/android.inc"
-#elif defined(__linux__) && __has_include(<sys/auxv.h>)
+#elif defined(__linux__)
#include "aarch64/hwcap.inc"
#include "aarch64/lse_atomics/getauxval.inc"
#elif defined(_WIN32)
@@ -76,7 +76,7 @@ struct {
#elif defined(__ANDROID__)
#include "aarch64/fmv/hwcap.inc"
#include "aarch64/fmv/android.inc"
-#elif defined(__linux__) && __has_include(<sys/auxv.h>)
+#elif defined(__linux__)
#include "aarch64/fmv/hwcap.inc"
#include "aarch64/fmv/getauxval.inc"
#elif defined(_WIN32)
More information about the llvm-commits
mailing list