File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
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 10
10
#define LLVM_LIBC_MACROS_MATH_MACROS_H
11
11
12
12
// TODO: Remove this. This is a temporary fix for a downstream problem.
13
- #ifdef LLVM_LIBC_FULLBUILD
13
+ // This cannot be left permanently since it would require downstream users to
14
+ // define this macro.
15
+ #ifdef LIBC_FULL_BUILD
14
16
15
17
#include " limits-macros.h"
16
18
@@ -82,10 +84,10 @@ template <typename T> inline constexpr bool isnan(T x) {
82
84
83
85
#endif
84
86
85
- #else
87
+ #else // LIBC_FULL_BUILD
86
88
87
89
#include < math.h>
88
90
89
- #endif // LLVM_LIBC_FULLBUILD
91
+ #endif // LIBC_FULL_BUILD
90
92
91
93
#endif // LLVM_LIBC_MACROS_MATH_MACROS_H
You can’t perform that action at this time.
0 commit comments