Name Date Size #Lines LOC

..--

BUILD.bazelHD25-Apr-20250

README.mdH A D25-Apr-20251.4 KiB2618

llvm-project.cxx17.patchH A D25-Apr-202517.5 KiB538527

llvm-project.incompatible_disallow_empty_glob.patchH A D25-Apr-202560.9 KiB2,1922,166

README.md

1# Patches
2
3All patches pair with the versions of the referenced repositories defined in `@rules_rust//bindgen:repositories.bzl`.
4
5## [llvm-project.cxx17](./llvm-project.cxx17.patch)
6
7The llvm-project requires a compiler that builds with at least C++14 but there's no configuration
8for this on the targets defined in the repo. This patch plumbs through flags for setting the C++
9version on targets to avoid any need for bazel configuration flags. If this patch causes issues
10for users with their current toolchain or toolchain definitions then simply defining the `llvm-raw`
11repository before loading `rust_bindgen_dependencies` should avoid this.
12
13## [llvm-project.incompatible_disallow_empty_glob](./llvm-project.incompatible_disallow_empty_glob.patch)
14
15Uses of `glob` are updated to have `allow_empty = True` added so the llvm-project repo is compatible
16with consumers building with [--incompatible_disallow_empty_glob](https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob).
17
18Most of this patch is generated using the following regex and replace patterns. There are a handful
19of additional modifications for more extravagant globs.
20
21| regex | replace |
22| --- | --- |
23| `glob\(([\[\w\d_\-\*\/\.\],=\n\s"]+)\) \+` | `glob($1, allow_empty = True) +` |
24| `glob\(([\[\w\d_\-\*\/\.\],=\n\s"]+)\),` | `glob($1, allow_empty = True),` |
25| `(,[\s\n]+), ` | `$1` |
26