diff options
| author | Bert Belder <bertbelder@gmail.com> | 2018-11-03 06:54:46 +0100 |
|---|---|---|
| committer | Bert Belder <bertbelder@gmail.com> | 2018-11-03 07:18:10 +0100 |
| commit | a4b514615796b9b4a2cac1b73935304447897805 (patch) | |
| tree | 38b2f179d7457ee29a4d831768d510d3f27b7a9e | |
| parent | 6446bc532840319ac9603c016e2ef419094fdeec (diff) | |
build: infer label name for versioned Rust crates
| -rw-r--r-- | build_extra/rust/BUILD.gn | 5 | ||||
| -rw-r--r-- | build_extra/rust/rust.gni | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/build_extra/rust/BUILD.gn b/build_extra/rust/BUILD.gn index 56e0aaa96..9f396b316 100644 --- a/build_extra/rust/BUILD.gn +++ b/build_extra/rust/BUILD.gn @@ -196,7 +196,6 @@ rust_crate("kernel32") { source_root = "$registry_github/kernel32-sys-0.2.2/src/lib.rs" extern_version = [ { - label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, @@ -208,7 +207,6 @@ rust_crate("ws2_32") { source_root = "$registry_github/ws2_32-sys-0.2.1/src/lib.rs" extern_version = [ { - label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, @@ -244,7 +242,6 @@ rust_crate("mio") { # See https://github.com/denoland/deno/issues/484. extern_version = [ { - label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, @@ -272,7 +269,6 @@ rust_crate("miow") { # See https://github.com/denoland/deno/issues/484. extern_version = [ { - label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, @@ -288,7 +284,6 @@ rust_crate("iovec") { # See https://github.com/denoland/deno/issues/484. extern_version = [ { - label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index c7ad376d0..3263f0018 100644 --- a/build_extra/rust/rust.gni +++ b/build_extra/rust/rust.gni @@ -113,14 +113,15 @@ template("rust_crate") { foreach(info, invoker.extern_version) { extern_rlibs += [ { + crate_name = info.crate_name + crate_version = info.crate_version crate_suffix = exec_script("//tools/sha256sum.py", [ - "--input=${info.crate_version}", + "--input=$crate_version", "--format=-%.8s", ], "trim string") - label = info.label - crate_name = info.crate_name + label = ":$crate_name-$crate_version" rlib = "$out_dir/lib$crate_name$crate_suffix.rlib" }, ] |
