summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-06-26 11:53:11 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-06-26 12:55:33 +0200
commit8ce86a09143d173e331ac7c9c79bddf26c97966d (patch)
tree2b84aaf87018bb35906d01637f05ceb8122e0d86
parent11a3709d3b28c2fc89778e46b4e8727ebc86ebac (diff)
downloadrules-rust-master.tar.gz
just-import-cargo: always provide Cargo.toml to build_scriptsHEADmaster
As more and more build scripts use Cargo.toml, routinely provide these files as data for build scripts.
-rwxr-xr-xbin/just-import-cargo.py1
-rw-r--r--rules/cargo/RULES1
2 files changed, 2 insertions, 0 deletions
diff --git a/bin/just-import-cargo.py b/bin/just-import-cargo.py
index e82c0c9..4507ed1 100755
--- a/bin/just-import-cargo.py
+++ b/bin/just-import-cargo.py
@@ -379,6 +379,7 @@ def compute_targets(
d_build_script["name"] = ["build_script"]
crate_root = os.path.relpath(t["src_path"], root_dir)
d_build_script["crate_root"] = [crate_root]
+ d_build_script["extra_data"] = ["Cargo.toml"]
d_build_script["arguments_config"] = config
d_build_script["edition"] = [t["edition"]]
d_build_script["stage"] = [rep_name]
diff --git a/rules/cargo/RULES b/rules/cargo/RULES
index dd48c4d..9d042dc 100644
--- a/rules/cargo/RULES
+++ b/rules/cargo/RULES
@@ -65,6 +65,7 @@
, "defaults": [{"type": "CALL_EXPRESSION", "name": "for host"}]
, "deps": [{"type": "CALL_EXPRESSION", "name": "for host as rlib"}]
, "srcs": [{"type": "CALL_EXPRESSION", "name": "for host"}]
+ , "extra_data": [{"type": "CALL_EXPRESSION", "name": "for host"}]
}
, "imports":
{ "call rustc artifact": ["./", "../rust", "call rustc artifact"]