676 Commits

Author SHA1 Message Date
Jordan Rupprecht
7a8e9dfe5c
[bazel][libc][NFC] Add missing layering deps (#107947)
After 277371943fa48f2550df02870951f5e5a77efef5

e.g.

```
external/llvm-project/libc/test/src/math/smoke/NextTowardTest.h:12:10: error: module llvm-project//libc/test/src/math/smoke:nexttowardf_test does not depend on a module exporting 'src/__support/CPP/bit.h'
```
2024-09-09 20:34:43 -05:00
lntue
277371943f
[libc][bazel] Update bazel overlay for math functions and their tests. (#107862) 2024-09-09 14:15:46 -04:00
Michael Jones
d851b5c12c
[libc] Make str_to_float independent of fenv (#102369)
The str_to_float conversion code doesn't need the features provided by
fenv and the dependency is creating a blocker for hand-in-hand. This
patch uses a workaround to remove this dependency.
2024-08-08 14:39:07 -07:00
Joseph Huber
cf416e0a1b
[libc] Use proxy headers for limits.h values (#102378)
Summary:
This defines some constants that may conflict with the system when in
overlay mode. Use the proxy header instead.

Fixes: https://github.com/llvm/llvm-project/issues/102368
2024-08-07 17:01:28 -05:00
RoseZhang03
0759508ff4
[libc] add sin/cos/tan functions to bazel build file (#101756)
Needed to add sin/cos/tan fuzz tests to google3
2024-08-05 21:16:25 +00:00
Michael Jones
ee6d932b4f
[libc][bazel] Remove tid tests from bazel (#101109)
In patch https://github.com/llvm/llvm-project/pull/100915 the tid code
was reverted. The bazel build wasn't updated, leaving some broken
targets. This patch fixes those.
2024-07-29 17:39:30 -07:00
Jorge Gorbe Moya
393a957d1c [bazel] Add missing dependency after 74a1ca504bf60f02431140ee72dbe1c158556237 2024-07-24 16:56:22 -07:00
Dmitry Chernenkov
7eb59a1ef9 [Bazel] Fix libc Bazel build for 29be889c2c9c9a92e7ed89bd71d141961517d7e5 2024-07-22 09:00:20 +00:00
lntue
9da9127fec
[libc][math] Fix signaling nan handling of hypot(f) and improve hypotf performance. (#99432)
The errors were reported by Paul Zimmermann with the CORE-MATH project's
test suites:
```
zimmerma@tartine:/tmp/core-math$ CORE_MATH_CHECK_STD=true LIBM=$L ./check.sh hypot
Running worst cases check in --rndn mode...
FAIL x=snan y=inf ref=qnan z=inf
Running worst cases check in --rndz mode...
FAIL x=snan y=inf ref=qnan z=inf
Running worst cases check in --rndu mode...
FAIL x=snan y=inf ref=qnan z=inf
Running worst cases check in --rndd mode...
Spurious inexact exception for x=0x1.ffffffffffffep+24 y=0x1p+0 (z=0x1.0000000000001p+25)
```
2024-07-19 10:40:44 -04:00
Krasimir Georgiev
3eb666e292 update bazel for a6d2da8b9d7be19816dd4c76b02016c19618c1be 2024-07-18 13:05:08 +00:00
Keith Smiley
e215cf7099
[bazel] Port changes from main (#99247)
This ports 5f8c46b88799a710f98c00d377d7edc34096f85d and
4531f82c1ad905614c1df9359a77d48e6397fd97
2024-07-16 14:52:16 -07:00
lntue
a6d2da8b9d
[libc][stdlib] Implement heap sort. (#98582) 2024-07-16 08:13:25 -04:00
Krasimir Georgiev
dcf30d3366
bazel build: pass __support_macros_config dep explicitly (NFCI) (#98999)
Passing it explicitly makes it that it's not made available to targets
that don't need it (also we've got some internal integration that trips
on it being passed implicitly in the rule definition).
2024-07-16 10:35:35 +02:00
Haojian Wu
40ed1946f2 [bazel] Fix the bazel build after 40effc7af5679b7d54d3176a5eef2cdee1962ecd 2024-07-13 07:52:29 +02:00
Petr Hosek
5ff3ff33ff
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)
This is a part of #97655.
2024-07-12 09:28:41 -07:00
Haojian Wu
e616fa5bc0 [bazel] Add missing dep for vfprintf_internal 2024-07-12 16:07:01 +02:00
Mehdi Amini
ce9035f5bd
Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)
Reverts llvm/llvm-project#98075

bots are broken
2024-07-12 09:12:13 +02:00
Petr Hosek
3f30effe1b
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)
This is a part of #97655.
2024-07-11 12:35:22 -07:00
Michael Jones
5aed6d67e3
Reland: [libc] Move off_t and stdio macros to proxy hdrs (#98384)
reland of https://github.com/llvm/llvm-project/pull/98215

Additionally adds proxy headers for FILE and the fopencookie types

The arm32 build has been failing due to redefinitions of the off_t type.
This patch fixes this by moving off_t to a proper proxy header. To do
this, it also moves stdio macros to a proxy header to hopefully avoid
including this proxy header alongside this public stdio.h.
2024-07-11 11:09:51 -07:00
Michael Jones
3a744283f4
Revert "[libc] Move off_t and stdio macros to proxy hdrs" (#98242)
Reverts llvm/llvm-project#98215

Breaks linux bots
2024-07-09 16:22:38 -07:00
Michael Jones
240ec5a375
[libc] Move off_t and stdio macros to proxy hdrs (#98215)
The arm32 build has been failing due to redefinitions of the off_t type.
This patch fixes this by moving off_t to a proper proxy header. To do
this, it also moves stdio macros to a proxy header to hopefully avoid
including this proxy header alongside this public stdio.h.
2024-07-09 16:17:02 -07:00
Haojian Wu
38bed81350 [bazel] Add missing deps for afa6bed8afe9011c07c682a0a24362260d92cfdd 2024-07-09 14:12:22 +02:00
Christian Sigg
2217933c6d [bazel][libc] Fix BUILD after 0182f5174f7cab31f8275718ae0aca7e9ac6fcd2. 2024-07-09 07:30:05 +02:00
Haojian Wu
40fe73e09f [bazel] Add missing gmp dep for f8834ed24bf11d19c96c49d42e77d4408af91fd8 2024-07-08 10:14:26 +02:00
Haojian Wu
4132ab84ee [bazel] Port for the libc change f8834ed24bf11d19c96c49d42e77d4408af91fd8 2024-07-08 09:30:28 +02:00
Benjamin Kramer
de68294b4d [bazel] Add missing dependency for 3c64a98180148340ed72aa2c19054ddfbcfa72e1 2024-07-01 14:38:03 +02:00
Mikhail Goncharov
c3eea8991f [bazel] update for 6c1c451b867f250f1c2fab709f0c8657ffd21116
it's interesting that bazel build passes
2024-07-01 10:18:37 +02:00
Benjamin Kramer
28944dbb2a [bazel] Add missing dependencies for e34dbb127af0596d07d01b9fa6cab5b2488ff37b 2024-06-28 13:26:53 +02:00
Keith Smiley
f82a595b7f
[bazel] Fix mpfr_wrapper build (#96341) 2024-06-21 11:06:28 -07:00
Dmitry Chernenkov
be6248a42a [Bazel] Layering fix for 65310f34d7edf7924ca4cbe7df836770669f70dc 2024-06-11 14:26:18 +00:00
Dmitry Chernenkov
11a944c50a [bazel][libc]Fix test bazel for 6b21e17049 2024-06-10 14:33:02 +00:00
Keith Smiley
4196c185b1
[bazel] Port #94078 (#94792) 2024-06-07 12:25:33 -07:00
Haojian Wu
5d0308f393 [bazel] Port for 649edb8eb25e82e3ac6fce4788f51759636229ec 2024-06-06 21:15:08 +02:00
Jordan Rupprecht
ab33fa59a2
[bazel] Fix smoke/BUILD.bazel layering in nextafter_test_template (#94641)
After 63cda2d19c310826722e8724649ceae7307389d7.

See also a97871e07dd62510dea1bb71b0f74261f52e4479.
2024-06-06 11:46:05 -05:00
Haojian Wu
a97871e07d [bazel] Fix layering check violation for nextafter_test_template target for 63cda2d 2024-06-06 15:43:56 +02:00
Michael Jones
20483edd27
[libc] Unpoison epoll structs (#94536)
The epoll wait functions return structs via pointer, but those structs
need to be unpoisoned before return. This patch adds that unpoisoning.
2024-06-05 15:02:28 -07:00
Keith Smiley
3d44926712
[bazel] Sync config with main (#94521) 2024-06-05 12:00:00 -07:00
Haojian Wu
2d9b83750f [bazel] Add missing dep for __support_cpp_expected 2024-06-05 15:13:29 +02:00
Keith Smiley
3b2df5b6ee
[bazel] Port #94218 (#94390) 2024-06-04 12:48:45 -07:00
Haojian Wu
90049bbbea [bazel] Add missing dep for __support_threads_sleep 2024-06-04 15:07:23 +02:00
Michael Jones
572b4e70cb
[libc][bazel] simplify type_traits with glob (#94079)
Previously the `type_traits` target manually listed all of the type
traits files. This patch replaces that with a glob to make the build
simpler.
2024-06-03 12:51:01 -07:00
Haojian Wu
12c85cd310 [bazel]: port for the libc change 142afde0eba4940f2b331274e9a3535fee960f35 2024-06-03 09:23:28 +02:00
RoseZhang03
07bd439457
[libc] added quick_exit function (#93620)
- In /libc/src/__support/ OSUtil, changed quick_exit to just exit, and
put in namespace
LIBC_NAMESPACE::internal.
- In /libc/src/stdlib added quick_exit
- Added test files for quick_exit
2024-05-31 10:19:10 -07:00
Keith Smiley
031f08c0a5
[bazel] Port #93567 (#93877) 2024-05-30 13:52:25 -07:00
lntue
4486fcba75
[libc] Add proxy header for float.h. (#93504)
This is the continuation of
https://github.com/llvm/llvm-project/pull/88674.

Fixes #88433, #90496.

---------

Co-authored-by: aniplcc <aniplccode@gmail.com>
2024-05-28 19:14:26 -04:00
Dmitri Gribenko
344c73ee83 [libc][bazel] Updates for 292b300c5131e54b9977305bb4aca9a03e1b4fed 2024-05-14 19:04:40 +02:00
Fangrui Song
f608ac2617 [bazel] Actually port libc #91905 2024-05-14 03:54:24 +00:00
Fangrui Song
22cc4488c9 [bazel] Port libc #91905 2024-05-13 18:18:30 -07:00
Michael Jones
4c79d38f82
[libc] add errno_macro header to bazel build (#92044)
Patch #91150 added a proxy header for errno macros. This patch fixes the
bazel build since it needs to be added as a dependency.
2024-05-13 16:05:09 -07:00
lntue
e1f279e92d
[libc] Use __builtin_fma(f) by default if LIBC_TARGET_CPU_HAS_FMA is defined. (#91535) 2024-05-09 13:10:43 -04:00