Commit Graph

2752 Commits

Author SHA1 Message Date
Benjamin Kramer
13e6ea7b4c [bazel] Add missing dependency for 08cf6ae537 2025-07-01 18:21:45 +02:00
sribee8
47e28d9cd1 [libc] wcscspn implementation (#146158)
Implemented wcscspn and tests.

---------

Co-authored-by: Sriya Pratipati <sriyap@google.com>
2025-07-01 15:56:09 +00:00
Benjamin Kramer
771ee8e387 [bazel] Add mising dependency for 698ec8c7ba 2025-07-01 15:02:41 +02:00
NAKAMURA Takumi
24c4bba076 [bazel] Quick fix for #145584 (Core deps ProfileData/InstrProf.h) 2025-07-01 10:03:03 +09:00
sribee8
4bf0c6b5f8 [libc][bazel] Added wchar functions to bazel (#146126)
Added wchar functions, apart from ones that use mbstate_t. to the bazel
files

---------

Co-authored-by: Sriya Pratipati <sriyap@google.com>
2025-06-30 20:05:26 +00:00
Thomas Hashem
18a0675082 [bazel] Add gdb-scripts filegroup in llvm and mlir (#146358)
This would be useful if downstream projects want to use the provided
pretty printers
2025-06-30 09:06:58 -07:00
Benjamin Kramer
80222f0aa4 [bazel] Port 3f531552e6 2025-06-28 21:18:13 +02:00
Jordan Rupprecht
163ad0bcda [bazel] Add lldb deps for #144627 (#146192) 2025-06-27 21:26:20 -05:00
Sterling-Augustine
254c26d022 Add missing dependency. (#146140)
As in the description.
2025-06-27 12:56:53 -07:00
Sterling-Augustine
23f1ba3ee4 Reapply "[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#… (#145959) (#146112)
Reapply "[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#…
(#145959)
    
This reapplies cbf781f0bd, with fixes for
the shared-library build and the unconventional sanitizer-runtime build.

Original Description:

This is the culmination of a series of changes described in [1].
    
Although somewhat large by line count, it is almost entirely mechanical,
creating a new library in DebugInfo/DWARF/LowLevel. This new library has
very minimal dependencies, allowing it to be used from more places than
the normal DebugInfo/DWARF library--in particular from MC.
    
1.
https://discourse.llvm.org/t/rfc-debuginfo-dwarf-refactor-into-to-lower-and-higher-level-libraries/86665/2
2025-06-27 11:05:49 -07:00
Benjamin Kramer
f0f46e25ec [bazel] Port 3fdf46ad60 2025-06-27 12:52:45 +02:00
Jordan Rupprecht
8ed064b979 [bazel] Add targets for transform.debug python extension (#146022)
For #145550 / c08502defe
2025-06-26 22:51:25 -05:00
Jordan Rupprecht
1b2843bae0 [bazel] Port #145995 (#146014)
Commit 0515449f6d
2025-06-26 22:21:48 -05:00
Jordan Rupprecht
4e154ccaf1 [bazel] Add missing deps needed for parse_headers after #145313 (#145978)
For d31ba52563
2025-06-26 17:03:15 -05:00
Sterling-Augustine
5d03e7a204 Revert "[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#… (#145959)
…145081)"

This reverts commit cbf781f0bd.

Breaks a couple of buildbots.
2025-06-26 13:09:20 -07:00
Sterling-Augustine
cbf781f0bd [NFC][DebugInfo][DWARF] Create new low-level dwarf library (#145081)
This is the culmination of a series of changes described in [1].
    
Although somewhat large by line count, it is almost entirely mechanical,
creating a new library in DebugInfo/DWARF/LowLevel. This new library has
very minimal dependencies, allowing it to be used from more places than
the normal DebugInfo/DWARF library--in particular from MC.
    
I am happy to put it in another location, or to structure it differently
if that makes sense. Some have suggested in BinaryFormat, but it is not
a great fit there. But if that makes more sense to the reviewers, I can
do that.
 
Another possibility would be to use pass-through headers to allow
clients who don't care to depend only on DebugInfo/DWARF. This would be
a much less invasive change, and perhaps easier for clients. But also a
system that hides details.

Either way, I'm open.

1.
https://discourse.llvm.org/t/rfc-debuginfo-dwarf-refactor-into-to-lower-and-higher-level-libraries/86665/2
2025-06-26 11:23:46 -07:00
jtstogel
442c417749 [libc][bazel] Support generating public libc headers in Bazel builds. (#145381)
Running `hdrgen` in Bazel hermetically requires adding a new dependency
on PyYAML. This PR uses PyYAML version 5.1 due to keep in line with the
docs:
b878e0d118/libc/docs/dev/header_generation.rst (L22)

See https://github.com/llvm/llvm-project/issues/134780.

Generated headers are placed in a `staging/` directory so that they have
the opportunity to be treated differently from non-generated headers.
This is a follow-up to https://github.com/llvm/llvm-project/pull/141256,
which was reverted in https://github.com/llvm/llvm-project/pull/143001
because it caused downstream failures when bootstrapping builds.
2025-06-26 11:17:57 -07:00
jtstogel
66ec14171e [libc][bazel] Add bazel targets for libc/include/... tests. (#141150)
This PR also sets `alwayslink=True` for `//libc/test:LibcUnitTest`. This
ensures that the `main` function provided always gets linked into a test
target. While not strictly necessary, it makes it so tests like
45d8759cbe/libc/test/include/signbit_test.c
will give a duplicate symbol error if they incorrectly depend on
`//libc/test:LibcUnitTest`.

This PR is missing tests for generated header includes since the current
Bazel setup lacks generated headers or a mechanism to run hermetic
tests. CMake version of the header include tests:
a2ce564720/libc/test/include/CMakeLists.txt (L515)

See issue https://github.com/llvm/llvm-project/issues/134780
2025-06-26 11:16:43 -07:00
Benjamin Kramer
6a5469bb81 [bazel] Fixes for e5a8c51c9d 2025-06-26 15:06:18 +02:00
Benjamin Kramer
3287c1c176 [XeGPU] Move targetinfo constants to their own header file
This breaks the dependency from Dialect to Utils, which would be cyclic.
2025-06-26 13:53:00 +02:00
Guillaume Chatelet
7289b6789e [libc] Improve memcpy for ARM Cortex-M supporting unaligned accesses. (#144872)
This implementation has been compiled with the [pigweed toolchain](https://pigweed.dev/toolchain.html) and tested on:
 - Raspberry Pi Pico 2 with the following options\
`--target=armv8m.main-none-eabi`
`-march=armv8m.main+fp+dsp`
`-mcpu=cortex-m33` 
 - Raspberry Pi Pico with the following options\
`--target=armv6m-none-eabi`
`-march=armv6m`
`-mcpu=cortex-m0+` 

They both compile down to a little bit more than 200 bytes and are between 2 and 10 times faster than byte per byte copies.

For best performance the following options can be set in the `libc/config/baremetal/arm/config.json`
```
{
  "codegen": {
    "LIBC_CONF_KEEP_FRAME_POINTER": {
      "value": false
    }
  },
  "general": {
    "LIBC_ADD_NULL_CHECKS": {
      "value": false
    }
  }
}
```
2025-06-26 10:18:02 +02:00
Ivan Tadeu Ferreira Antunes Filho
9b307ebdd0 [bazel] Update deps from #144657 (#145726)
https://github.com/llvm/llvm-project/pull/144657 added #include
"mlir/Dialect/Linalg/IR/LinalgEnums.td" to
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td, so
we update the deps
2025-06-25 12:27:40 -04:00
Benjamin Kramer
0036beeeef [bazel] Port e175ecff93 2025-06-25 13:25:40 +02:00
Benjamin Kramer
29f8dca085 [bazel] Add missing dependency for e93a0d0d1e 2025-06-25 11:25:39 +02:00
Lance Wang
77af8bff97 [mlir]Moves the StateStack to IR folder from Support folder. (#145598)
[MLIR] Fix circular dependency introduced in In
https://github.com/llvm/llvm-project/pull/144897. This PR is to break
the dependency. by moving StateStack to IR folder

This commit resolves a circular dependency issue between mlir/Support
and mlir/IR:

- Move StateStack.h and StateStack.cpp from Support to IR folder
- Update CMakeLists.txt files to reflect the new locations
- Update Bazel BUILD file to maintain correct dependencies
- Update includes in affected files (flang, Target/LLVMIR)

The circular dependency was caused by StateStack.h depending on
IR/Visitors.h
while other IR files depended on Support. Moving StateStack to IR
eliminates
this cycle while maintaining proper separation of concerns.
2025-06-25 00:00:13 -04:00
Ivan Tadeu Ferreira Antunes Filho
2b5141189f [bazel] Add missing comma to BUILD.bazel (#145573) 2025-06-24 15:19:36 -04:00
Ivan Tadeu Ferreira Antunes Filho
de569ad6b8 [bazel] Add //mlir:IR to Support for #144897 (#145569)
PR https://github.com/llvm/llvm-project/pull/144897 added #include
"mlir/IR/Visitors.h" to mlir/include/mlir/Support/StateStack.h. This
change fixes the build file.
2025-06-24 14:40:10 -04:00
Ivan Tadeu Ferreira Antunes Filho
ffdfe94a2b [bazel] Add //mlir:DialectUtils to TestTransforms for #145376 (#145557)
PR https://github.com/llvm/llvm-project/pull/145376 added #include
"mlir/Dialect/Utils/StaticValueUtils.h" to
mlir/test/lib/Transforms/TestTransformsOps.cpp . This change fixes the
build file.
2025-06-24 14:01:49 -04:00
Benjamin Kramer
e4b9aa6192 [bazel] Port d31ba52563 2025-06-24 11:37:50 +02:00
Benjamin Kramer
45c5eb168f [bazel] mlir_copts doesn't exist 2025-06-24 11:31:55 +02:00
Aviad Cohen
d5c8024dae [mlir][bazel]: Add FuncUtil rule in bazel files (#145463) 2025-06-24 10:40:57 +03:00
Benjamin Kramer
9881a507a2 [bazel] Port 8584b216b8 2025-06-23 14:31:15 +02:00
Benjamin Kramer
7e77aaebfb [bazel] Add missing dependency for 4af96a9d83 2025-06-23 13:37:45 +02:00
Benjamin Kramer
bd809ffb4b [bazel] Make lld:ELF glob wider so it doesn't break as easily 2025-06-23 13:32:30 +02:00
Benjamin Kramer
680bce0072 [bazel] Add missing dependency for c7165587e4 2025-06-23 13:28:57 +02:00
NAKAMURA Takumi
ad36800d65 [bazel][lld] Follow up 491b82a5ec (llvmorg-21-init-16192-g491b82a5ec1a) 2025-06-21 07:50:35 +09:00
Yijia Gu
bae48ac3c0 [mlir][bazel] add missing deps for XeGPUTransforms 2025-06-20 11:14:14 -07:00
Karlo Basioli
fdb572681d Fix bazel build after #144594 (#144904) 2025-06-19 15:50:53 +01:00
Jakub Kuderski
96bbe472ef Revert "[mlir][spirv] Fix int type declaration duplication when serializing" and follow up commits (#144773)
This reverts the following PRs:
* https://github.com/llvm/llvm-project/pull/143108
* https://github.com/llvm/llvm-project/pull/144538
* https://github.com/llvm/llvm-project/pull/144685

Reverting because this disabled tests when building without the llvm
spirv backend enabled.
2025-06-18 16:15:06 -04:00
Karlo Basioli
2a41350aab Fix bazel build issue caused by #142986 second attempt (#144721 didnt… (#144743)
… cover everything)
2025-06-18 17:15:12 +01:00
Karlo Basioli
8fc20bffab Fix bazel build issue caused by 142986 (#144721) 2025-06-18 16:07:56 +01:00
Karlo Basioli
5a9cc93a20 Fix for bazel build #142079 (#144665) 2025-06-18 10:57:03 +01:00
Karlo Basioli
58c4fa96cb Fix bazel build for #142771 (#144659) 2025-06-18 10:21:37 +01:00
Yijia Gu
0cfc59ff51 [mlir][bazel] remove extra empty space for XeGPUTransforms 2025-06-17 10:56:31 -07:00
Yijia Gu
030b5519ec [mlir][bazel] add missing deps for XeGPUTransforms 2025-06-17 10:52:34 -07:00
Karlo Basioli
7ec103a984 Port #143108 to bazel (#144538) 2025-06-17 15:52:33 +01:00
Benjamin Kramer
de3339063a [bazel] Port b4e39e4ff9 2025-06-17 15:44:30 +02:00
Karlo Basioli
64bd4858dc Amend enviroment variables in bazel - change from #144391 (#144484) 2025-06-17 10:09:10 +01:00
Jorge Gorbe Moya
199428e047 [bazel][lld] Remove unneeded dependencies. (#144455)
As far as I can tell these are not used in any includes in their
respective targets, and building all of LLD with
```
bazel build --config=generic_clang @llvm-project//lld/...
```
still works.
2025-06-16 20:41:40 -07:00
Jacques Pienaar
9e16792639 [mlir][bzl] Add CAPIIndex rule. (#144248) 2025-06-14 23:35:20 -07:00