Skip to content

Commit 4a1fce7

Browse files
committed
[libc] Fix installed 'math.h' header paths
Summary: Recent changes added an include path in the float128 type that used the internal `libc` path to find the macro. This doesn't work once it's installed because we need to search from the root of the install dir. Move the include to the top-level math.h so we can find it.
1 parent c6fa71c commit 4a1fce7

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

libc/include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ add_gen_header(
9999
DEPENDS
100100
.llvm_libc_common_h
101101
.llvm-libc-macros.math_macros
102+
.llvm-libc-macros.float_macros
102103
.llvm-libc-types.double_t
103104
.llvm-libc-types.float_t
104105
.llvm-libc-types.float128

libc/include/llvm-libc-types/float128.h

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

12-
#include <include/llvm-libc-macros/float-macros.h> // LDBL_MANT_DIG
13-
1412
// Currently, C23 `_Float128` type is only defined as a built-in type in GCC 7
1513
// or later, and only for C. For C++, or for clang, `__float128` is defined
1614
// instead, and only on x86-64 targets.

libc/include/math.h.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
#include <__llvm-libc-common.h>
1313
#include <llvm-libc-macros/math-macros.h>
14+
#include <llvm-libc-macros/float-macros.h>
1415
#include <llvm-libc-types/float128.h>
1516

16-
1717
%%public_api()
1818

1919
#endif // LLVM_LIBC_MATH_H

0 commit comments

Comments
 (0)