third_party/cargo: generate for windows build

windows
q3k 2021-01-08 01:03:25 +00:00
parent c25045bcb2
commit f0f4cd5b96
12 changed files with 101 additions and 6 deletions

View File

@ -19,7 +19,10 @@ flatbuffers = "0.6.1"
[workspace.metadata.raze]
workspace_path = "//third_party/cargo"
targets = [ "x86_64-unknown-linux-gnu" ]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
]
genmode = "Vendored"
rust_rules_workspace_name = "io_bazel_rules_rust"
package_aliases_dir = "."

View File

@ -61,5 +61,13 @@ rust_library(
"//third_party/cargo/vendor/libc-0.2.82:libc",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -60,6 +60,14 @@ rust_library(
"//third_party/cargo/vendor/cfg-if-1.0.0:cfg_if",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -66,6 +66,16 @@ rust_library(
"//third_party/cargo/vendor/libc-0.2.82:libc",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/kernel32-sys-0.2.2:kernel32_sys",
"//third_party/cargo/vendor/miow-0.2.2:miow",
"//third_party/cargo/vendor/winapi-0.2.8:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -62,5 +62,13 @@ rust_library(
"//third_party/cargo/vendor/libc-0.2.82:libc",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -62,5 +62,13 @@ rust_library(
"//third_party/cargo/vendor/libc-0.2.82:libc",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -59,6 +59,7 @@ rust_library(
] + selects.with_or({
# cfg(not(target_arch = "wasm32"))
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
"@io_bazel_rules_rust//rust/platform:x86_64-unknown-linux-gnu",
): [
],

View File

@ -37,6 +37,8 @@ licenses([
rust_library(
name = "same_file",
srcs = glob(["**/*.rs"]),
aliases = {
},
crate_features = [
],
crate_root = "src/lib.rs",
@ -53,5 +55,13 @@ rust_library(
version = "1.0.6",
# buildifier: leave-alone
deps = [
],
] + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-util-0.1.5:winapi_util",
],
"//conditions:default": [],
}),
)

View File

@ -33,6 +33,8 @@ licenses([
rust_library(
name = "termcolor",
srcs = glob(["**/*.rs"]),
aliases = {
},
crate_features = [
],
crate_root = "src/lib.rs",
@ -49,5 +51,13 @@ rust_library(
version = "1.1.2",
# buildifier: leave-alone
deps = [
],
] + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-util-0.1.5:winapi_util",
],
"//conditions:default": [],
}),
)

View File

@ -33,6 +33,8 @@ licenses([
rust_library(
name = "walkdir",
srcs = glob(["**/*.rs"]),
aliases = {
},
crate_features = [
],
crate_root = "src/lib.rs",
@ -50,5 +52,14 @@ rust_library(
# buildifier: leave-alone
deps = [
"//third_party/cargo/vendor/same-file-1.0.6:same_file",
],
] + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
"//third_party/cargo/vendor/winapi-util-0.1.5:winapi_util",
],
"//conditions:default": [],
}),
)

View File

@ -33,6 +33,8 @@ licenses([
rust_library(
name = "winapi_util",
srcs = glob(["**/*.rs"]),
aliases = {
},
crate_features = [
],
crate_root = "src/lib.rs",
@ -49,5 +51,13 @@ rust_library(
version = "0.1.5",
# buildifier: leave-alone
deps = [
],
] + selects.with_or({
# cfg(windows)
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)

View File

@ -114,6 +114,7 @@ rust_library(
"//third_party/cargo/vendor/libc-0.2.82:libc",
"//third_party/cargo/vendor/log-0.4.11:log",
"//third_party/cargo/vendor/raw-window-handle-0.3.3:raw_window_handle",
"//third_party/cargo/vendor/parking_lot-0.11.1:parking_lot",
] + selects.with_or({
# cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))
(
@ -121,13 +122,20 @@ rust_library(
): [
"//third_party/cargo/vendor/mio-0.6.23:mio",
"//third_party/cargo/vendor/mio-extras-2.0.6:mio_extras",
"//third_party/cargo/vendor/parking_lot-0.11.1:parking_lot",
"//third_party/cargo/vendor/percent-encoding-2.1.0:percent_encoding",
"//third_party/cargo/vendor/smithay-client-toolkit-0.12.2:smithay_client_toolkit",
"//third_party/cargo/vendor/wayland-client-0.28.3:wayland_client",
"//third_party/cargo/vendor/x11-dl-2.18.5:x11_dl",
],
"//conditions:default": [],
}) + selects.with_or({
# cfg(target_os = "windows")
(
"@io_bazel_rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
"//third_party/cargo/vendor/winapi-0.3.9:winapi",
],
"//conditions:default": [],
}),
)