File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
utils/bazel/llvm-project-overlay/libc Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ function(_get_common_compile_options output_var flags)
43
43
list (APPEND compile_options "-fpie" )
44
44
45
45
if (LLVM_LIBC_FULL_BUILD)
46
+ list (APPEND compile_options "-DLIBC_FULL_BUILD" )
46
47
# Only add -ffreestanding flag in full build mode.
47
48
list (APPEND compile_options "-ffreestanding" )
48
49
endif ()
@@ -126,6 +127,7 @@ function(_get_common_test_compile_options output_var c_test flags)
126
127
list (APPEND compile_options "-fpie" )
127
128
128
129
if (LLVM_LIBC_FULL_BUILD)
130
+ list (APPEND compile_options "-DLIBC_FULL_BUILD" )
129
131
# Only add -ffreestanding flag in full build mode.
130
132
list (APPEND compile_options "-ffreestanding" )
131
133
list (APPEND compile_options "-fno-exceptions" )
@@ -178,5 +180,10 @@ function(_get_hermetic_test_compile_options output_var flags)
178
180
-Wno-multi-gpu --cuda-path =${LIBC_CUDA_ROOT}
179
181
-nogpulib -march=${LIBC_GPU_TARGET_ARCHITECTURE} -fno-use-cxa-atexit)
180
182
endif ()
183
+
184
+ if (LLVM_LIBC_FULL_BUILD)
185
+ list (APPEND compile_options "-DLIBC_FULL_BUILD" )
186
+ endif ()
187
+
181
188
set (${output_var} ${compile_options} PARENT_SCOPE)
182
189
endfunction ()
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_MACROS_MATH_MACROS_H
10
10
#define LLVM_LIBC_MACROS_MATH_MACROS_H
11
11
12
+ // TODO: Remove this. This is a temporary fix for a downstream problem.
13
+ // This cannot be left permanently since it would require downstream users to
14
+ // define this macro.
15
+ #ifdef LIBC_FULL_BUILD
16
+
12
17
#include " limits-macros.h"
13
18
14
19
#define FP_NAN 0
@@ -79,4 +84,10 @@ template <typename T> inline constexpr bool isnan(T x) {
79
84
80
85
#endif
81
86
87
+ #else // LIBC_FULL_BUILD
88
+
89
+ #include < math.h>
90
+
91
+ #endif // LIBC_FULL_BUILD
92
+
82
93
#endif // LLVM_LIBC_MACROS_MATH_MACROS_H
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ libc_support_library(
68
68
name = "llvm_libc_macros_math_macros" ,
69
69
hdrs = ["include/llvm-libc-macros/math-macros.h" ],
70
70
deps = [":llvm_libc_macros_limits_macros" ],
71
- defines = ["__FP_LOGBNAN_MIN" ],
72
71
)
73
72
74
73
libc_support_library (
@@ -1000,8 +999,8 @@ libc_support_library(
1000
999
1001
1000
libc_support_library (
1002
1001
name = "__support_osutil_quick_exit" ,
1003
- hdrs = ["src/__support/OSUtil/quick_exit.h" ],
1004
1002
srcs = ["src/__support/OSUtil/linux/quick_exit.cpp" ],
1003
+ hdrs = ["src/__support/OSUtil/quick_exit.h" ],
1005
1004
deps = [
1006
1005
":__support_osutil_syscall" ,
1007
1006
],
You can’t perform that action at this time.
0 commit comments