mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
build: infer label name for versioned Rust crates
This commit is contained in:
parent
6446bc5328
commit
a4b5146157
2 changed files with 4 additions and 8 deletions
|
@ -196,7 +196,6 @@ rust_crate("kernel32") {
|
||||||
source_root = "$registry_github/kernel32-sys-0.2.2/src/lib.rs"
|
source_root = "$registry_github/kernel32-sys-0.2.2/src/lib.rs"
|
||||||
extern_version = [
|
extern_version = [
|
||||||
{
|
{
|
||||||
label = ":winapi-0.2"
|
|
||||||
crate_name = "winapi"
|
crate_name = "winapi"
|
||||||
crate_version = "0.2"
|
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"
|
source_root = "$registry_github/ws2_32-sys-0.2.1/src/lib.rs"
|
||||||
extern_version = [
|
extern_version = [
|
||||||
{
|
{
|
||||||
label = ":winapi-0.2"
|
|
||||||
crate_name = "winapi"
|
crate_name = "winapi"
|
||||||
crate_version = "0.2"
|
crate_version = "0.2"
|
||||||
},
|
},
|
||||||
|
@ -244,7 +242,6 @@ rust_crate("mio") {
|
||||||
# See https://github.com/denoland/deno/issues/484.
|
# See https://github.com/denoland/deno/issues/484.
|
||||||
extern_version = [
|
extern_version = [
|
||||||
{
|
{
|
||||||
label = ":winapi-0.2"
|
|
||||||
crate_name = "winapi"
|
crate_name = "winapi"
|
||||||
crate_version = "0.2"
|
crate_version = "0.2"
|
||||||
},
|
},
|
||||||
|
@ -272,7 +269,6 @@ rust_crate("miow") {
|
||||||
# See https://github.com/denoland/deno/issues/484.
|
# See https://github.com/denoland/deno/issues/484.
|
||||||
extern_version = [
|
extern_version = [
|
||||||
{
|
{
|
||||||
label = ":winapi-0.2"
|
|
||||||
crate_name = "winapi"
|
crate_name = "winapi"
|
||||||
crate_version = "0.2"
|
crate_version = "0.2"
|
||||||
},
|
},
|
||||||
|
@ -288,7 +284,6 @@ rust_crate("iovec") {
|
||||||
# See https://github.com/denoland/deno/issues/484.
|
# See https://github.com/denoland/deno/issues/484.
|
||||||
extern_version = [
|
extern_version = [
|
||||||
{
|
{
|
||||||
label = ":winapi-0.2"
|
|
||||||
crate_name = "winapi"
|
crate_name = "winapi"
|
||||||
crate_version = "0.2"
|
crate_version = "0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -113,14 +113,15 @@ template("rust_crate") {
|
||||||
foreach(info, invoker.extern_version) {
|
foreach(info, invoker.extern_version) {
|
||||||
extern_rlibs += [
|
extern_rlibs += [
|
||||||
{
|
{
|
||||||
|
crate_name = info.crate_name
|
||||||
|
crate_version = info.crate_version
|
||||||
crate_suffix = exec_script("//tools/sha256sum.py",
|
crate_suffix = exec_script("//tools/sha256sum.py",
|
||||||
[
|
[
|
||||||
"--input=${info.crate_version}",
|
"--input=$crate_version",
|
||||||
"--format=-%.8s",
|
"--format=-%.8s",
|
||||||
],
|
],
|
||||||
"trim string")
|
"trim string")
|
||||||
label = info.label
|
label = ":$crate_name-$crate_version"
|
||||||
crate_name = info.crate_name
|
|
||||||
rlib = "$out_dir/lib$crate_name$crate_suffix.rlib"
|
rlib = "$out_dir/lib$crate_name$crate_suffix.rlib"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue