Move `crubit_feature_hint.bzl` to `crubit/features`.
This is going to be used by both rs_bindings_from_cc and cc_bindings_from_rs, so it needs to go into a common directory. There's two pretty obvious options:
* crubit/common/bazel_support
* crubit/features
I think the second one is more "self-contained" and puts code closer together and less spread out throughout the codebase, so I put it there.
PiperOrigin-RevId: 663652310
Change-Id: Ib16a7453cd8435166d51cb40580abfa9af6e4c56
diff --git a/features/BUILD b/features/BUILD
index 411176a..0381859 100644
--- a/features/BUILD
+++ b/features/BUILD
@@ -1,5 +1,6 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(
- "//rs_bindings_from_cc/bazel_support:crubit_feature_hint.bzl",
+ ":crubit_feature_hint.bzl",
"crubit_feature_hint",
)
@@ -43,3 +44,13 @@
crubit_features = ["experimental"],
visibility = ["//:__subpackages__"],
)
+
+# Implementation details follow.
+
+bzl_library(
+ name = "crubit_feature_hint_bzl",
+ srcs = ["crubit_feature_hint.bzl"],
+ visibility = [
+ "//:__subpackages__",
+ ],
+)
diff --git a/rs_bindings_from_cc/bazel_support/crubit_feature_hint.bzl b/features/crubit_feature_hint.bzl
similarity index 100%
rename from rs_bindings_from_cc/bazel_support/crubit_feature_hint.bzl
rename to features/crubit_feature_hint.bzl
diff --git a/rs_bindings_from_cc/bazel_support/BUILD b/rs_bindings_from_cc/bazel_support/BUILD
index bfa8300..c1c30ce 100644
--- a/rs_bindings_from_cc/bazel_support/BUILD
+++ b/rs_bindings_from_cc/bazel_support/BUILD
@@ -19,10 +19,10 @@
],
deps = [
":additional_rust_srcs_for_crubit_bindings_aspect_hint_bzl",
- ":crubit_feature_hint_bzl",
":providers_bzl",
":rust_bindings_from_cc_cli_flag_aspect_hint",
":rust_bindings_from_cc_utils_bzl",
+ "//features:crubit_feature_hint_bzl",
],
)
@@ -95,11 +95,6 @@
)
bzl_library(
- name = "crubit_feature_hint_bzl",
- srcs = ["crubit_feature_hint.bzl"],
-)
-
-bzl_library(
name = "generate_bindings_bzl",
srcs = ["generate_bindings.bzl"],
deps = ["@bazel_tools//tools/build_defs/cc:action_names"],
diff --git a/rs_bindings_from_cc/bazel_support/rust_bindings_from_cc_aspect.bzl b/rs_bindings_from_cc/bazel_support/rust_bindings_from_cc_aspect.bzl
index 928da56..d06eb22 100644
--- a/rs_bindings_from_cc/bazel_support/rust_bindings_from_cc_aspect.bzl
+++ b/rs_bindings_from_cc/bazel_support/rust_bindings_from_cc_aspect.bzl
@@ -8,12 +8,12 @@
"""
load(
- "@@//rs_bindings_from_cc/bazel_support:additional_rust_srcs_for_crubit_bindings_aspect_hint.bzl",
- "get_additional_rust_srcs",
+ "//features:crubit_feature_hint.bzl",
+ "find_crubit_features",
)
load(
- "@@//rs_bindings_from_cc/bazel_support:crubit_feature_hint.bzl",
- "find_crubit_features",
+ "@@//rs_bindings_from_cc/bazel_support:additional_rust_srcs_for_crubit_bindings_aspect_hint.bzl",
+ "get_additional_rust_srcs",
)
load(
"@@//rs_bindings_from_cc/bazel_support:providers.bzl",