Skip to content

Commit

Permalink
Update bindgen rules to build clang from source. (bazelbuild#1998)
Browse files Browse the repository at this point in the history
* Update bindgen rules to build clang from source.

* Regenerate documentation
  • Loading branch information
UebelAndre authored Jun 13, 2023
1 parent 5a1a757 commit 3e2ee94
Show file tree
Hide file tree
Showing 61 changed files with 3,006 additions and 107 deletions.
7 changes: 0 additions & 7 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ default_macos_targets: &default_macos_targets
default_windows_targets: &default_windows_targets
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
- "//..."
- "-//bindgen/..."
- "-//test/proto/..."
- "-//test/unit/pipelined_compilation/..."
crate_universe_vendor_example_targets: &crate_universe_vendor_example_targets
Expand Down Expand Up @@ -349,9 +348,6 @@ tasks:
- "-//sys/..."
# See https://github.com/bazelbuild/bazel/issues/9987
- "-//ffi/rust_calling_c:matrix_dylib_test"
# The bindgen rules currently do not work on RBE
# see: https://github.com/bazelbuild/rules_rust/issues/919
- "-//bindgen/..."
shell_commands:
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
Expand All @@ -378,9 +374,6 @@ tasks:
windows_targets: &windows_targets
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
- "//..."
# The bindgen rules currently do not work on windows
# see: https://github.com/bazelbuild/rules_rust/issues/919
- "-//bindgen/..."
# The proto rules do not work on windows
- "-//proto/..."
# The wasm rules do not work on windows
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ rust_bindgen_dependencies()

rust_bindgen_register_toolchains()

load("@rules_rust//bindgen:transitive_repositories.bzl", "rust_bindgen_transitive_dependencies")

rust_bindgen_transitive_dependencies()

load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")

rust_analyzer_dependencies()
Expand Down
11 changes: 8 additions & 3 deletions bindgen/3rdparty/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ crates_vendor(
"indexmap": [crate.annotation(
gen_build_script = True,
)],
"libloading": [crate.annotation(
gen_build_script = True,
)],
"log": [crate.annotation(
rustc_flags = ["--cfg=atomic_cas"],
)],
"winapi": [crate.annotation(
gen_build_script = True,
)],
},
cargo_lockfile = "Cargo.Bazel.lock",
generate_build_scripts = False,
mode = "remote",
packages = {
"bindgen": crate.spec(
features = ["runtime"],
version = "0.60.1",
),
"clang-sys": crate.spec(
# Should match the version of llvm-project being used.
features = ["clang_14_0"],
),
"libloading": crate.spec(
version = "0.7.3",
),
Expand Down
1 change: 1 addition & 0 deletions bindgen/3rdparty/Cargo.Bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.aho-corasick-0.7.20.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions bindgen/3rdparty/crates/BUILD.atty-0.2.14.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.autocfg-1.1.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions bindgen/3rdparty/crates/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bindgen/3rdparty/crates/BUILD.bindgen-0.60.1.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion bindgen/3rdparty/crates/BUILD.bitflags-1.3.2.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.cexpr-0.6.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions bindgen/3rdparty/crates/BUILD.clang-sys-1.4.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.clap-3.2.23.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.clap_lex-0.2.4.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.either-1.8.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.env_logger-0.9.3.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.glob-0.3.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion bindgen/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindgen/3rdparty/crates/BUILD.hermit-abi-0.1.19.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.humantime-2.1.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions bindgen/3rdparty/crates/BUILD.indexmap-1.9.2.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.lazycell-1.3.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bindgen/3rdparty/crates/BUILD.libc-0.2.139.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e2ee94

Please sign in to comment.