Skip to content

Conversation

@willyzha
Copy link
Collaborator

Temporary pull request to test CRT bzlmod migration on the CI

Willy Zhang added 12 commits December 30, 2025 11:53
- Migrate dependencies to MODULE.bazel (LLVM, Python, Rust); bump Bazel to 7.3.1.
- Update C++ to C++17/C11; configure LLVM and aspect_rules_lint.
- Fix build/tests in src/ate, proxy_buffer, and config/spm.
- Move patches to third_party/ and remove legacy repo config.

Signed-off-by: Willy Zhang <willyzhang@google.com>
This change completes the Bzlmod migration for Google-hosted dependencies.

Specific changes:
- Move re2 and protobuf-matchers to MODULE.bazel.
- Remove legacy third_party/google/repos.bzl.
- Drop unused boringssl-windows-constraints.patch.

Signed-off-by: Willy Zhang <willyzhang@google.com>
Migrate rules_foreign_cc and upb from WORKSPACE to MODULE.bazel.
- Add rules_foreign_cc and upb (required by gRPC) to MODULE.bazel.
- Remove legacy third_party/bazel macros and files.
- Remove protocol_compiler bind from WORKSPACE.

Signed-off-by: Willy Zhang <willyzhang@google.com>
- Move softhsm2 definition from WORKSPACE to MODULE.bazel.
- Update src/pk11/test_support.go to use bazel.Runfile for locating softhsm2-util.
- Remove third_party/softhsm2/repos.bzl.

Signed-off-by: Willy Zhang <willyzhang@google.com>
- Move lowrisc repository definitions from WORKSPACE to MODULE.bazel.
- Remove legacy third_party/lowrisc/repos.bzl.
- Update documentation to reference MODULE.bazel.

Signed-off-by: Willy Zhang <willyzhang@google.com>
- Remove unused third_party/protobuf/BUILD.bazel.
- Remove third_party/protobuf/grpc-go-toolchain.patch.
- Remove third_party/protobuf/grpc-windows-constraints.patch.
- Remove third_party/protobuf/repos.bzl.
- Remove third_party/google/BUILD.bazel.

Signed-off-by: Willy Zhang <willyzhang@google.com>
Signed-off-by: Willy Zhang <willyzhang@google.com>
This change updates the `rules_rust_bindgen` patching strategy to support building on modern Linux hosts that enforce PIE.

Split `bindgen_static_lib.patch` into three focused patches:
 - `bindgen_remove_static_check.patch`: Supports header-only deps.
 - `bindgen_prioritize_pic.patch`: Prioritizes PIC libs for host PIE builds.
 - `bindgen_fix_resource_dir.patch`: Fixes Clang resource dir detection.

Signed-off-by: Willy Zhang <willyzhang@google.com>
This commit completes the Bzlmod migration for core dependencies,
Go toolchains, and Docker rules. It includes the following key changes:

- Migrated `rules_docker` and `rules_go` dependencies to MODULE.bazel.
- Updated `rules/vendor.bzl` to use `default_vendor_label` instead of `dummy_label` for clarity.
- Added `third_party/docker/rules_docker_fix.patch` to fix `image_transition` platform constraints (forcing x86_64/linux).
- Added `third_party/lowrisc/opentitan_llvm.patch` to remove conflicting LLVM toolchain configurations.
- Updated `third_party/docker` and `third_party/lint` to use module extensions.
Signed-off-by: Willy Zhang <willyzhang@google.com>
Signed-off-by: Willy Zhang <willyzhang@google.com>
Signed-off-by: Willy Zhang <willyzhang@google.com>
@willyzha willyzha force-pushed the crt-migration branch 3 times, most recently from 70fd256 to 3aee718 Compare January 5, 2026 03:37
Willy Zhang added 4 commits January 4, 2026 19:45
Signed-off-by: Willy Zhang <willyzhang@google.com>
Signed-off-by: Willy Zhang <willyzhang@google.com>
Signed-off-by: Willy Zhang <willyzhang@google.com>
Upgraded to Bazel 8.0.1 and resolved Bzlmod/Starlark incompatibilities:

- **MODULE.bazel**: Upgraded `rules_docker` to v0.26.0 and unified Rust `crate_index` with upstream `lowrisc_opentitan` to fix type mismatches.
- **Toolchains**: Updated GCC MinGW paths and wrappers to support Bazel 8's `+` directory naming convention.
- **Config**: Renamed local providers `MyArtifactNamePatternInfo` -> `ArtifactNamePatternInfo` and `MyFeatureInfo` -> `FeatureInfo` for clarity.
- **Build**: Fixed `otlib_wrapper` to use stable `@crate_index` alias.

Signed-off-by: Willy Zhang <willyzhang@google.com>
@willyzha willyzha force-pushed the crt-migration branch 11 times, most recently from 226cb82 to dee5779 Compare January 6, 2026 03:19
@willyzha willyzha force-pushed the crt-migration branch 18 times, most recently from 79a62ef to 98bf376 Compare January 6, 2026 19:30
@willyzha willyzha closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant