mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
64 lines
3.0 KiB
Diff
64 lines
3.0 KiB
Diff
# What: expose the existing unconditional build-script dependency input through
|
|
# the `rules_rs` crate annotation API.
|
|
# Scope: annotation plumbing only; generated dependency resolution is unchanged.
|
|
|
|
diff --git a/rs/extensions.bzl b/rs/extensions.bzl
|
|
index 7a09ce4..2b8f1ad 100644
|
|
--- a/rs/extensions.bzl
|
|
+++ b/rs/extensions.bzl
|
|
@@ -318,7 +318,7 @@ crate.annotation(
|
|
kwargs = dict(
|
|
hub_name = hub_name,
|
|
gen_build_script = annotation.gen_build_script,
|
|
- build_script_deps = [],
|
|
+ build_script_deps = annotation.build_script_deps,
|
|
build_script_deps_select = _select(feature_resolutions.build_deps),
|
|
build_script_data = annotation.build_script_data,
|
|
build_script_data_select = annotation.build_script_data_select,
|
|
@@ -876,9 +876,9 @@ _annotation = tag_class(
|
|
"build_script_data_select": attr.string_list_dict(
|
|
doc = "A list of labels to add to a crate's `cargo_build_script::data` attribute. Keys should be the platform triplet. Value should be a list of labels.",
|
|
),
|
|
- # "build_script_deps": _relative_label_list(
|
|
- # doc = "A list of labels to add to a crate's `cargo_build_script::deps` attribute.",
|
|
- # ),
|
|
+ "build_script_deps": _relative_label_list(
|
|
+ doc = "A list of labels to add to a crate's `cargo_build_script::deps` attribute.",
|
|
+ ),
|
|
"build_script_env": attr.string_dict(
|
|
doc = "Additional environment variables to set on a crate's `cargo_build_script::env` attribute.",
|
|
),
|
|
diff --git a/rs/private/annotations.bzl b/rs/private/annotations.bzl
|
|
index eb2f82e..51a2b68 100644
|
|
--- a/rs/private/annotations.bzl
|
|
+++ b/rs/private/annotations.bzl
|
|
@@ -4,6 +4,7 @@ def _crate_annotation(
|
|
gen_build_script = "auto",
|
|
build_script_data = [],
|
|
build_script_data_select = {},
|
|
+ build_script_deps = [],
|
|
build_script_env = {},
|
|
build_script_env_select = {},
|
|
build_script_tools = [],
|
|
@@ -30,6 +31,7 @@ def _crate_annotation(
|
|
gen_build_script = gen_build_script,
|
|
build_script_data = build_script_data,
|
|
build_script_data_select = build_script_data_select,
|
|
+ build_script_deps = build_script_deps,
|
|
build_script_env = build_script_env,
|
|
build_script_env_select = build_script_env_select,
|
|
build_script_tools = build_script_tools,
|
|
diff --git a/rs/private/repository_utils.bzl b/rs/private/repository_utils.bzl
|
|
index 4bf5c12..0a7a311 100644
|
|
--- a/rs/private/repository_utils.bzl
|
|
+++ b/rs/private/repository_utils.bzl
|
|
@@ -286,7 +286,7 @@ load("@{hub_name}//:defs.bzl", "RESOLVED_PLATFORMS")
|
|
rust_crate_attrs = {
|
|
"hub_name": attr.string(),
|
|
"gen_build_script": attr.string(),
|
|
- "build_script_deps": attr.label_list(default = []),
|
|
+ "build_script_deps": attr.string_list(default = []),
|
|
"build_script_deps_select": attr.string_list_dict(),
|
|
"build_script_data": attr.label_list(default = []),
|
|
"build_script_data_select": attr.string_list_dict(),
|