-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc] Add proxy header math_macros.h. #87598
Conversation
@llvm/pr-subscribers-libc Author: None (lntue) ChangesContext: #87017
Patch is 117.25 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/87598.diff 143 Files Affected:
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index a0d79858a896ad..175efd89d67e6d 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -381,6 +381,7 @@ endforeach()
add_subdirectory(include)
add_subdirectory(config)
+add_subdirectory(hdr)
add_subdirectory(src)
add_subdirectory(utils)
diff --git a/libc/fuzzing/math/CMakeLists.txt b/libc/fuzzing/math/CMakeLists.txt
index 86c864083d206b..6990a04922a5cf 100644
--- a/libc/fuzzing/math/CMakeLists.txt
+++ b/libc/fuzzing/math/CMakeLists.txt
@@ -8,6 +8,7 @@ add_libc_fuzzer(
SingleInputSingleOutputDiff.h
TwoInputSingleOutputDiff.h
DEPENDS
+ libc.hdr.math_macros
libc.src.math.ceil
libc.src.math.ceilf
libc.src.math.ceill
diff --git a/libc/fuzzing/math/RemQuoDiff.h b/libc/fuzzing/math/RemQuoDiff.h
index 95a9866f29dbbe..84a6a24ce52719 100644
--- a/libc/fuzzing/math/RemQuoDiff.h
+++ b/libc/fuzzing/math/RemQuoDiff.h
@@ -11,7 +11,7 @@
#include "src/__support/FPUtil/FPBits.h"
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include <stddef.h>
#include <stdint.h>
diff --git a/libc/fuzzing/stdlib/CMakeLists.txt b/libc/fuzzing/stdlib/CMakeLists.txt
index 711b0fd9820f93..204bc619318da2 100644
--- a/libc/fuzzing/stdlib/CMakeLists.txt
+++ b/libc/fuzzing/stdlib/CMakeLists.txt
@@ -22,6 +22,7 @@ add_libc_fuzzer(
SRCS
strtofloat_fuzz.cpp
DEPENDS
+ libc.hdr.math_macros
libc.src.stdlib.atof
libc.src.stdlib.strtof
libc.src.stdlib.strtod
diff --git a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
index b000321854d16d..c158162ba6238e 100644
--- a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
+++ b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp
@@ -16,7 +16,7 @@
#include "src/__support/FPUtil/FPBits.h"
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include <stddef.h>
#include <stdint.h>
diff --git a/libc/hdr/CMakeLists.txt b/libc/hdr/CMakeLists.txt
new file mode 100644
index 00000000000000..1d3eb9d5240ab9
--- /dev/null
+++ b/libc/hdr/CMakeLists.txt
@@ -0,0 +1,33 @@
+function(add_proxy_header_library target_name)
+ cmake_parse_arguments(
+ "ADD_PROXY_HEADER"
+ "" # Optional arguments
+ "" # Single value arguments
+ "DEPENDS;FULL_BUILD_DEPENDS" # Multi-value arguments
+ ${ARGN}
+ )
+
+ set(deps "")
+ if(ADD_PROXY_HEADER_DEPENDS)
+ list(APPEND deps ${ADD_PROXY_HEADER_DEPENDS})
+ endif()
+
+ if(LLVM_LIBC_FULL_BUILD AND ADD_PROXY_HEADER_FULL_BUILD_DEPENDS)
+ list(APPEND deps ${ADD_PROXY_HEADER_FULL_BUILD_DEPENDS})
+ endif()
+
+ add_header_library(
+ ${target_name}
+ ${ADD_PROXY_HEADER_UNPARSED_ARGUMENTS}
+ DEPENDS ${deps}
+ )
+endfunction()
+
+add_proxy_header_library(
+ math_macros
+ HDRS
+ math_macros.h
+ FULL_BUILD_DEPENDS
+ libc.include.llvm-libc-macros.math_macros
+ libc.include.math
+)
diff --git a/libc/hdr/math_macros.h b/libc/hdr/math_macros.h
new file mode 100644
index 00000000000000..008d00354b4b0e
--- /dev/null
+++ b/libc/hdr/math_macros.h
@@ -0,0 +1,22 @@
+//===-- Definition of macros from math.h ----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_HDR_MATH_MACROS_H
+#define LLVM_LIBC_HDR_MATH_MACROS_H
+
+#ifdef LLVM_LIBC_FULL_BUILD
+
+#include "include/llvm-libc-macros/math-macros.h"
+
+#else // Overlay mode
+
+#include <math.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_MATH_MACROS_H
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 1497e32044e975..3ee32e331ed27c 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -30,12 +30,12 @@
#define INFINITY __builtin_inf()
#define NAN __builtin_nanf("")
-#define FP_ILOGB0 (-INT_MAX - 1)
-#define FP_LLOGB0 (-LONG_MAX - 1)
+#define FP_ILOGB0 INT_MIN
+#define FP_LLOGB0 LONG_MIN
#ifdef __FP_LOGBNAN_MIN
-#define FP_ILOGBNAN (-INT_MAX - 1)
-#define FP_LLOGBNAN (-LONG_MAX - 1)
+#define FP_ILOGBNAN INT_MIN
+#define FP_LLOGBNAN LONG_MIN
#else
#define FP_ILOGBNAN INT_MAX
#define FP_LLOGBNAN LONG_MAX
diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt
index ff155a19758d20..1af236ed9d6bc1 100644
--- a/libc/src/__support/FPUtil/CMakeLists.txt
+++ b/libc/src/__support/FPUtil/CMakeLists.txt
@@ -4,7 +4,7 @@ add_header_library(
FEnvImpl.h
DEPENDS
libc.include.fenv
- libc.include.math
+ libc.hdr.math_macros
libc.src.__support.macros.attributes
libc.src.errno.errno
)
@@ -15,7 +15,6 @@ add_header_library(
rounding_mode.h
DEPENDS
libc.include.fenv
- libc.include.math
libc.src.__support.macros.attributes
libc.src.__support.macros.properties.architectures
libc.src.__support.macros.sanitizer
@@ -59,9 +58,9 @@ add_header_library(
.fp_bits
.fenv_impl
.rounding_mode
+ libc.hdr.math_macros
libc.src.__support.CPP.type_traits
libc.src.__support.common
- libc.include.math
libc.src.errno.errno
)
@@ -216,12 +215,12 @@ add_header_library(
.dyadic_float
.nearest_integer_operations
.normal_float
+ libc.hdr.math_macros
libc.src.__support.CPP.bit
libc.src.__support.CPP.limits
libc.src.__support.CPP.type_traits
libc.src.__support.common
libc.src.__support.macros.optimization
- libc.include.math
libc.src.errno.errno
)
diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 6086d5d3de2dca..4be1a57f0f4b38 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FPUTIL_FENVIMPL_H
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_FENVIMPL_H
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/properties/architectures.h"
#include "src/errno/libc_errno.h"
diff --git a/libc/src/__support/FPUtil/ManipulationFunctions.h b/libc/src/__support/FPUtil/ManipulationFunctions.h
index 2c90b4888c2e5d..a289c2ef70467b 100644
--- a/libc/src/__support/FPUtil/ManipulationFunctions.h
+++ b/libc/src/__support/FPUtil/ManipulationFunctions.h
@@ -15,7 +15,7 @@
#include "dyadic_float.h"
#include "rounding_mode.h"
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/limits.h" // INT_MAX, INT_MIN
#include "src/__support/CPP/type_traits.h"
diff --git a/libc/src/__support/FPUtil/NearestIntegerOperations.h b/libc/src/__support/FPUtil/NearestIntegerOperations.h
index 6b28e7ffb387b5..4645ab0b5350be 100644
--- a/libc/src/__support/FPUtil/NearestIntegerOperations.h
+++ b/libc/src/__support/FPUtil/NearestIntegerOperations.h
@@ -13,7 +13,7 @@
#include "FPBits.h"
#include "rounding_mode.h"
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index b164d33e204b1a..02760237d4f7b3 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -102,8 +102,8 @@ add_object_library(
HDRS
math_utils.h
DEPENDS
+ libc.hdr.math_macros
libc.include.errno
- libc.include.math
libc.src.errno.errno
)
@@ -139,7 +139,6 @@ add_entrypoint_object(
../cosf.h
DEPENDS
.sincosf_utils
- libc.include.math
libc.src.errno.errno
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fenv_impl
@@ -162,7 +161,6 @@ add_entrypoint_object(
DEPENDS
.range_reduction
.sincosf_utils
- libc.include.math
libc.src.errno.errno
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fenv_impl
@@ -185,7 +183,6 @@ add_entrypoint_object(
DEPENDS
.range_reduction
.sincosf_utils
- libc.include.math
libc.src.errno.errno
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -207,7 +204,6 @@ add_entrypoint_object(
DEPENDS
.range_reduction
.sincosf_utils
- libc.include.math
libc.src.errno.errno
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fenv_impl
@@ -721,7 +717,6 @@ add_entrypoint_object(
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.polyeval
libc.src.__support.macros.optimization
- libc.include.math
COMPILE_OPTIONS
-O3
)
@@ -736,7 +731,6 @@ add_entrypoint_object(
.common_constants
.explogxf
libc.include.errno
- libc.include.math
libc.src.__support.CPP.bit
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.dyadic_float
@@ -772,7 +766,6 @@ add_entrypoint_object(
libc.src.__support.macros.optimization
libc.include.errno
libc.src.errno.errno
- libc.include.math
COMPILE_OPTIONS
-O3
)
@@ -787,7 +780,6 @@ add_entrypoint_object(
.common_constants
.explogxf
libc.include.errno
- libc.include.math
libc.src.__support.CPP.bit
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.dyadic_float
@@ -822,7 +814,6 @@ add_header_library(
libc.src.__support.common
libc.include.errno
libc.src.errno.errno
- libc.include.math
)
add_entrypoint_object(
@@ -847,7 +838,6 @@ add_entrypoint_object(
.common_constants
.explogxf
libc.include.errno
- libc.include.math
libc.src.__support.CPP.bit
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.dyadic_float
@@ -881,7 +871,6 @@ add_header_library(
libc.src.__support.common
libc.include.errno
libc.src.errno.errno
- libc.include.math
COMPILE_OPTIONS
-O3
)
@@ -908,7 +897,6 @@ add_entrypoint_object(
.common_constants
.explogxf
libc.include.errno
- libc.include.math
libc.src.__support.CPP.bit
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.dyadic_float
@@ -944,7 +932,6 @@ add_entrypoint_object(
libc.src.__support.macros.optimization
libc.include.errno
libc.src.errno.errno
- libc.include.math
COMPILE_OPTIONS
-O3
)
@@ -961,7 +948,6 @@ add_entrypoint_object(
.exp2f_impl
.explogxf
libc.include.errno
- libc.include.math
libc.src.__support.CPP.bit
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.fenv_impl
@@ -2685,7 +2671,6 @@ add_object_library(
libc.src.__support.common
libc.include.errno
libc.src.errno.errno
- libc.include.math
COMPILE_OPTIONS
-O3
)
diff --git a/libc/src/math/generic/math_utils.h b/libc/src/math/generic/math_utils.h
index cced761fc8c822..3ddfeccfd64837 100644
--- a/libc/src/math/generic/math_utils.h
+++ b/libc/src/math/generic/math_utils.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_MATH_GENERIC_MATH_UTILS_H
#define LLVM_LIBC_SRC_MATH_GENERIC_MATH_UTILS_H
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt
index 745a9a04b4af82..5e26a1000633b7 100644
--- a/libc/test/CMakeLists.txt
+++ b/libc/test/CMakeLists.txt
@@ -18,10 +18,6 @@ add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(utils)
-if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_BAREMETAL)
- add_subdirectory(IntegrationTest)
-endif()
-
if(NOT LLVM_LIBC_FULL_BUILD)
return()
endif()
@@ -31,4 +27,6 @@ if(NOT ${LIBC_TARGET_OS} STREQUAL "linux" AND
# Integration tests are currently only available for linux and the GPU.
return()
endif()
+
+add_subdirectory(IntegrationTest)
add_subdirectory(integration)
diff --git a/libc/test/UnitTest/FPMatcher.h b/libc/test/UnitTest/FPMatcher.h
index f4553eac5c8a57..a76e0b8ef6f6f0 100644
--- a/libc/test/UnitTest/FPMatcher.h
+++ b/libc/test/UnitTest/FPMatcher.h
@@ -18,7 +18,7 @@
#include "test/UnitTest/StringUtils.h"
#include "test/UnitTest/Test.h"
-#include "include/llvm-libc-macros/math-macros.h"
+#include "hdr/math_macros.h"
namespace LIBC_NAMESPACE {
namespace testing {
diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index f70ffda3f700e5..95f1768c96aac3 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -3,7 +3,7 @@ function(add_fp_unittest name)
"MATH_UNITTEST"
"NEED_MPFR;UNIT_TEST_ONLY;HERMETIC_TEST_ONLY" # Optional arguments
"" # Single value arguments
- "LINK_LIBRARIES" # Multi-value arguments
+ "LINK_LIBRARIES;DEPENDS" # Multi-value arguments
${ARGN}
)
@@ -28,11 +28,17 @@ function(add_fp_unittest name)
endif()
list(APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers)
+ set(deps libc.hdr.math_macros)
+ if(MATH_UNITTEST_DEPENDS)
+ list(APPEND deps ${MATH_UNITTEST_DEPENDS})
+ endif()
+
add_libc_test(
${name}
${test_type}
LINK_LIBRARIES "${MATH_UNITTEST_LINK_LIBRARIES}"
"${MATH_UNITTEST_UNPARSED_ARGUMENTS}"
+ DEPENDS "${deps}"
)
endfunction(add_fp_unittest)
diff --git a/libc/test/src/__support/uint_test.cpp b/libc/test/src/__support/uint_test.cpp
index 5764324ca28815..de56428e6bb4b0 100644
--- a/libc/test/src/__support/uint_test.cpp
+++ b/libc/test/src/__support/uint_test.cpp
@@ -10,7 +10,7 @@
#include "src/__support/UInt.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT128
-#include "include/llvm-libc-macros/math-macros.h" // HUGE_VALF, HUGE_VALF
+#include "hdr/math_macros.h" // HUGE_VALF, HUGE_VALF
#include "test/UnitTest/Test.h"
namespace LIBC_NAMESPACE {
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index f8f0f8ba7b6f63..fa3e7f58309050 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -108,7 +108,6 @@ add_fp_unittest(
HDRS
FAbsTest.h
DEPENDS
- libc.include.math
libc.src.math.fabs
libc.src.__support.FPUtil.fp_bits
)
@@ -123,7 +122,6 @@ add_fp_unittest(
HDRS
FAbsTest.h
DEPENDS
- libc.include.math
libc.src.math.fabsf
libc.src.__support.FPUtil.fp_bits
)
@@ -138,7 +136,6 @@ add_fp_unittest(
HDRS
FAbsTest.h
DEPENDS
- libc.include.math
libc.src.math.fabsl
libc.src.__support.FPUtil.fp_bits
)
@@ -153,7 +150,6 @@ add_fp_unittest(
HDRS
TruncTest.h
DEPENDS
- libc.include.math
libc.src.math.trunc
libc.src.__support.FPUtil.fp_bits
)
@@ -168,7 +164,6 @@ add_fp_unittest(
HDRS
TruncTest.h
DEPENDS
- libc.include.math
libc.src.math.truncf
libc.src.__support.FPUtil.fp_bits
)
@@ -183,7 +178,6 @@ add_fp_unittest(
HDRS
TruncTest.h
DEPENDS
- libc.include.math
libc.src.math.truncl
libc.src.__support.FPUtil.fp_bits
)
@@ -198,7 +192,6 @@ add_fp_unittest(
HDRS
CeilTest.h
DEPENDS
- libc.include.math
libc.src.math.ceil
libc.src.__support.FPUtil.fp_bits
)
@@ -213,7 +206,6 @@ add_fp_unittest(
HDRS
CeilTest.h
DEPENDS
- libc.include.math
libc.src.math.ceilf
libc.src.__support.FPUtil.fp_bits
)
@@ -228,7 +220,6 @@ add_fp_unittest(
HDRS
CeilTest.h
DEPENDS
- libc.include.math
libc.src.math.ceill
libc.src.__support.FPUtil.fp_bits
)
@@ -243,7 +234,6 @@ add_fp_unittest(
HDRS
FloorTest.h
DEPENDS
- libc.include.math
libc.src.math.floor
libc.src.__support.FPUtil.fp_bits
)
@@ -258,7 +248,6 @@ add_fp_unittest(
HDRS
FloorTest.h
DEPENDS
- libc.include.math
libc.src.math.floorf
libc.src.__support.FPUtil.fp_bits
)
@@ -273,7 +262,6 @@ add_fp_unittest(
HDRS
FloorTest.h
DEPENDS
- libc.include.math
libc.src.math.floorl
libc.src.__support.FPUtil.fp_bits
)
@@ -288,7 +276,6 @@ add_fp_unittest(
HDRS
RoundTest.h
DEPENDS
- libc.include.math
libc.src.math.round
libc.src.__support.FPUtil.fp_bits
)
@@ -303,7 +290,6 @@ add_fp_unittest(
HDRS
RoundTest.h
DEPENDS
- libc.include.math
libc.src.math.roundf
libc.src.__support.FPUtil.fp_bits
)
@@ -318,7 +304,6 @@ add_fp_unittest(
HDRS
RoundTest.h
DEPENDS
- libc.include.math
libc.src.math.roundl
libc.src.__support.FPUtil.fp_bits
)
@@ -333,7 +318,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -352,7 +336,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -371,7 +354,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -390,7 +372,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -409,7 +390,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -428,7 +408,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.errno.errno
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
@@ -447,7 +426,6 @@ add_fp_unittest(
HDRS
RIntTest.h
DEPENDS
- libc.include.math
libc.src.math.rint
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -463,7 +441,6 @@ add_fp_unittest(
HDRS
RIntTest.h
DEPENDS
- libc.include.math
libc.src.math.rintf
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -479,7 +456,6 @@ add_fp_unittest(
HDRS
RIntTest.h
DEPENDS
- libc.include.math
libc.src.math.rintl
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -495,7 +471,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.lrint
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -511,7 +486,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.lrintf
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -527,7 +501,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.lrintl
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -543,7 +516,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.llrint
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -559,7 +531,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.llrintf
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -575,7 +546,6 @@ add_fp_unittest(
HDRS
RoundToIntegerTest.h
DEPENDS
- libc.include.math
libc.src.math.llrintl
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
@@ -590,7 +560,6 @@ add_fp_unittest(
expf_test.cpp
DEPENDS
libc.src.errno.errno
- libc.include.math
libc.src.math.expf
libc.src.__support.FPUtil.fp_bits
)
@@ -618,7 +587,6 @@ add_fp_unittest(
exp2f_test.cpp
DEPENDS
libc.src.errno.errno
- libc.include.math
libc.src.math.exp2f
libc.src.__support.FPUtil.fp_bits
)
@@ -646,7 +614,6 @@ add_fp_unittest(
exp10f_test.cpp
DEPENDS
libc.src.errno.errno
- libc.include.math
libc.src.math.exp10f
libc.src.__support.FPUtil.fp_bits
)
@@ -674,7 +641,6 @@ add_fp_unittest(
HDRS
CopySignTest.h
DEPENDS
- libc.include.math
libc.src.math.copysign...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch overall looks good to me. Do we expose any macro to end users to indicate full build and overlay build?
For cmake cli,
For implementations in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think this gives me a clearer picture of what the usage of "proxy" headers might look like (#87017).
${ADD_PROXY_HEADER_UNPARSED_ARGUMENTS} | ||
DEPENDS ${deps} | ||
) | ||
endfunction() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice, I should rebase #87017 onto this cmake change.
Context: #87017
libc/hdr/math_macros.h
that will:<math.h>
in overlay mode,"include/llvm-libc-macros/math-macros.h"
in full build mode.libc.hdr.math_macros
will only depend onlibc.include.math
andlibc.include.llvm-libc-macros.math_macros
in full build mode.#include "include/llvm-libc-macros/math-macros.h"
with#include "hdr/math_macros.h"
.libc.hdr.math_macros
CMake target when usingadd_fp_unittest
.libc:hdr_math_macros
target, and replacing all dependency onlibc:llvm_libc_macros_math_macros
withlibc:hdr_math_macros
.