fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

Julia RyanAdd patching examplea4c87621

cleanup
4 files

files

BUILD.bazel0 B
README.md1.4 KiB
llvm-project.cxx17.patch17.5 KiB
llvm-project.incompatible_disallow_empty_glob.patch60.9 KiB

Patches

All patches pair with the versions of the referenced repositories defined in @rules_rust_bindgen//:repositories.bzl.

llvm-project.cxx17

The llvm-project requires a compiler that builds with at least C++14 but there's no configuration for this on the targets defined in the repo. This patch plumbs through flags for setting the C++ version on targets to avoid any need for bazel configuration flags. If this patch causes issues for users with their current toolchain or toolchain definitions then simply defining the llvm-raw repository before loading rust_bindgen_dependencies should avoid this.

llvm-project.incompatible_disallow_empty_glob

Uses of glob are updated to have allow_empty = True added so the llvm-project repo is compatible with consumers building with --incompatible_disallow_empty_glob.

Most of this patch is generated using the following regex and replace patterns. There are a handful of additional modifications for more extravagant globs.

regexreplace
glob\(([\[\w\d_\-\*\/\.\],=\n\s"]+)\) \+glob($1, allow_empty = True) +
glob\(([\[\w\d_\-\*\/\.\],=\n\s"]+)\),glob($1, allow_empty = True),
(,[\s\n]+), $1