From fbe861076e75201141fa86bb98e8d0bc1ce71f25 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Wed, 11 Dec 2024 08:10:24 -0800 Subject: [PATCH] Enable bindgen tests for windows --- .bazelci/presubmit.yml | 26 ++++++++++++-------------- extensions/bindgen/private/bindgen.bzl | 7 +++++-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 8eab85b55d..7c010e692f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -909,20 +909,18 @@ tasks: - "//..." test_targets: - "//..." - # # TODO: https://github.com/bazelbuild/rules_rust/issues/2009 - # # The bindgen rules are currently broken on windows - # extensions_bindgen_windows: - # platform: windows - # name: Extensions Bindgen - # working_directory: extensions/bindgen - # build_flags: *aspects_flags - # test_flags: *aspects_flags - # build_targets: - # - "--" - # - "//..." - # test_targets: - # - "--" - # - "//..." + extensions_bindgen_windows: + platform: windows + name: Extensions Bindgen + working_directory: extensions/bindgen + build_flags: *aspects_flags + test_flags: *aspects_flags + build_targets: + - "--" + - "//..." + test_targets: + - "--" + - "//..." extensions_prost_linux: platform: ubuntu2004 name: Extensions Prost diff --git a/extensions/bindgen/private/bindgen.bzl b/extensions/bindgen/private/bindgen.bzl index 3a44d1741b..3d87bc8933 100644 --- a/extensions/bindgen/private/bindgen.bzl +++ b/extensions/bindgen/private/bindgen.bzl @@ -130,7 +130,7 @@ def _get_user_link_flags(cc_lib): return linker_flags def _generate_cc_link_build_info(ctx, cc_lib): - """Produce the eqivilant cargo_build_script providers for use in linking the library. + """Produce the equivalent cargo_build_script providers for use in linking the library. Args: ctx (ctx): The rule's context object @@ -391,7 +391,10 @@ rust_bindgen = rule( default = True, ), "wrap_static_fns": attr.bool( - doc = "Whether to create a separate .c file for static fns. Requires nightly toolchain, and a header that actually needs this feature (otherwise bindgen won't generate the file and Bazel complains).", + doc = ( + "Whether to create a separate .c file for static functions. Requires nightly toolchain, " + + "and a header that actually needs this feature (otherwise bindgen won't generate the file and Bazel complains)." + ), default = False, ), "_cc_toolchain": attr.label(