Skip to content

Commit fa94097

Browse files
[libc] Temporary math macros fix
Downstream's having some issues due to math-macros.h issues. These will be fixed properly soon.
1 parent 698bf3d commit fa94097

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

libc/include/llvm-libc-macros/math-macros.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#ifndef LLVM_LIBC_MACROS_MATH_MACROS_H
1010
#define LLVM_LIBC_MACROS_MATH_MACROS_H
1111

12+
// TODO: Remove this. This is a temporary fix for a downstream problem.
13+
#ifdef LLVM_LIBC_FULLBUILD
14+
1215
#include "limits-macros.h"
1316

1417
#define FP_NAN 0
@@ -79,4 +82,10 @@ template <typename T> inline constexpr bool isnan(T x) {
7982

8083
#endif
8184

85+
#else
86+
87+
#include <math.h>
88+
89+
#endif // LLVM_LIBC_FULLBUILD
90+
8291
#endif // LLVM_LIBC_MACROS_MATH_MACROS_H

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ libc_support_library(
6868
name = "llvm_libc_macros_math_macros",
6969
hdrs = ["include/llvm-libc-macros/math-macros.h"],
7070
deps = [":llvm_libc_macros_limits_macros"],
71-
defines = ["__FP_LOGBNAN_MIN"],
7271
)
7372

7473
libc_support_library(
@@ -1000,8 +999,8 @@ libc_support_library(
1000999

10011000
libc_support_library(
10021001
name = "__support_osutil_quick_exit",
1003-
hdrs = ["src/__support/OSUtil/quick_exit.h"],
10041002
srcs = ["src/__support/OSUtil/linux/quick_exit.cpp"],
1003+
hdrs = ["src/__support/OSUtil/quick_exit.h"],
10051004
deps = [
10061005
":__support_osutil_syscall",
10071006
],

0 commit comments

Comments
 (0)