aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-11-24 16:11:05 +0100
committerGitHub <noreply@github.com>2023-11-24 16:11:05 +0100
commit5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372 (patch)
treefc72004093a2f72ade3840f4e10476f71914b600 /utils
parent50c298fd174f1a98fd20374a65d1faecba5649e1 (diff)
downloadllvm-5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372.zip
llvm-5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372.tar.gz
llvm-5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372.tar.bz2
[libc][NFC] Move float macro into its own header / add target os detection (#73311)
Floating point properties are a combination of target OS, target architecture and compiler support. - Adding target OS detection, - Moving floating point type detection to its own file. This is in preparation of adding support for `_Float16` which requires testing compiler **version** and target architecture.
Diffstat (limited to 'utils')
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel18
1 files changed, 17 insertions, 1 deletions
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 19573d8..e7dc978 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -76,6 +76,21 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_macros_properties_os",
+ hdrs = ["src/__support/macros/properties/os.h"],
+)
+
+libc_support_library(
+ name = "__support_macros_properties_float",
+ hdrs = ["src/__support/macros/properties/float.h"],
+ deps = [
+ ":__support_macros_properties_architectures",
+ ":__support_macros_properties_compiler",
+ ":__support_macros_properties_os",
+ ],
+)
+
+libc_support_library(
name = "__support_macros_properties_cpu_features",
hdrs = ["src/__support/macros/properties/cpu_features.h"],
deps = [
@@ -308,7 +323,7 @@ libc_support_library(
deps = [
":__support_macros_attributes",
":__support_macros_config",
- ":__support_macros_properties_compiler",
+ ":__support_macros_properties_float",
],
)
@@ -657,6 +672,7 @@ libc_support_library(
name = "__support_fputil_float_properties",
hdrs = ["src/__support/FPUtil/FloatProperties.h"],
deps = [
+ ":__support_macros_properties_float",
":__support_uint128",
],
)