[libc-commits] [libc] d07a216 - Add generic sqrt root headers to libc sqrt specializations (#135237)

via libc-commits libc-commits at lists.llvm.org
Thu Apr 10 12:04:44 PDT 2025


Author: Drew Lewis
Date: 2025-04-10T12:04:41-07:00
New Revision: d07a2164e7c7812b96b0f04a39af5483660bac71

URL: https://github.com/llvm/llvm-project/commit/d07a2164e7c7812b96b0f04a39af5483660bac71
DIFF: https://github.com/llvm/llvm-project/commit/d07a2164e7c7812b96b0f04a39af5483660bac71.diff

LOG: Add generic sqrt root headers to libc sqrt specializations (#135237)

This header is needed to provide the declaration for the sqrt template.
You can build without these in the CMake build, but not having this
include in the architecture specific headers makes them not self
contained.

Added: 
    

Modified: 
    libc/src/__support/FPUtil/aarch64/sqrt.h
    libc/src/__support/FPUtil/arm/sqrt.h
    libc/src/__support/FPUtil/riscv/sqrt.h
    libc/src/__support/FPUtil/x86_64/sqrt.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/FPUtil/aarch64/sqrt.h b/libc/src/__support/FPUtil/aarch64/sqrt.h
index 2bda8e895b375..4eb576bf2244c 100644
--- a/libc/src/__support/FPUtil/aarch64/sqrt.h
+++ b/libc/src/__support/FPUtil/aarch64/sqrt.h
@@ -18,6 +18,8 @@
 #error "Invalid include"
 #endif
 
+#include "src/__support/FPUtil/generic/sqrt.h"
+
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 

diff  --git a/libc/src/__support/FPUtil/arm/sqrt.h b/libc/src/__support/FPUtil/arm/sqrt.h
index 497dbc504b79f..e6cb58c0be817 100644
--- a/libc/src/__support/FPUtil/arm/sqrt.h
+++ b/libc/src/__support/FPUtil/arm/sqrt.h
@@ -18,6 +18,8 @@
 #error "Invalid include"
 #endif
 
+#include "src/__support/FPUtil/generic/sqrt.h"
+
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 

diff  --git a/libc/src/__support/FPUtil/riscv/sqrt.h b/libc/src/__support/FPUtil/riscv/sqrt.h
index 14a34359ee32b..8cff03a9fc73e 100644
--- a/libc/src/__support/FPUtil/riscv/sqrt.h
+++ b/libc/src/__support/FPUtil/riscv/sqrt.h
@@ -18,6 +18,8 @@
 #error "Invalid include"
 #endif
 
+#include "src/__support/FPUtil/generic/sqrt.h"
+
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 

diff  --git a/libc/src/__support/FPUtil/x86_64/sqrt.h b/libc/src/__support/FPUtil/x86_64/sqrt.h
index eae40cc8829f1..e10447751d216 100644
--- a/libc/src/__support/FPUtil/x86_64/sqrt.h
+++ b/libc/src/__support/FPUtil/x86_64/sqrt.h
@@ -18,6 +18,8 @@
 #error "sqrtss / sqrtsd need SSE2"
 #endif
 
+#include "src/__support/FPUtil/generic/sqrt.h"
+
 namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 


        


More information about the libc-commits mailing list