Skip to content

Instantly share code, notes, and snippets.

@pikajude
Created June 20, 2022 19:36
Show Gist options
  • Save pikajude/4c6eec44aba219e58f5803a7efecf10b to your computer and use it in GitHub Desktop.
Save pikajude/4c6eec44aba219e58f5803a7efecf10b to your computer and use it in GitHub Desktop.
###############################################################################
# @generated
# This file is auto-generated by the cargo-bazel tool.
#
# DO NOT MODIFY: Local changes may be replaced in future executions.
###############################################################################
load(
"@bazel_skylib//lib:selects.bzl",
"selects",
)
load(
"@rules_rust//cargo:defs.bzl",
"cargo_build_script",
)
load(
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_proc_macro",
)
# buildifier: disable=bzl-visibility
load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
package(default_visibility = ["//visibility:public"])
# licenses([
# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# ])
rust_library(
name = "rustix",
deps = [
] + select_with_or({
# cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", not(target_pointer_width = "32")), target_arch = "arm", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))
(
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi",
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi",
"@rules_rust//rust/platform:i686-unknown-linux-gnu",
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
): [
# Target Deps
"@crate_index__linux-raw-sys-0.0.42//:linux_raw_sys",
# Common Deps
"@crate_index__bitflags-1.3.2//:bitflags",
"@crate_index__io-lifetimes-0.5.3//:io_lifetimes",
"@crate_index__rustix-0.33.7//:build_script_build",
],
# cfg(all(windows, not(target_vendor = "uwp")))
(
"@rules_rust//rust/platform:i686-pc-windows-msvc",
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
# Target Deps
"@crate_index__winapi-0.3.9//:winapi",
# Common Deps
"@crate_index__bitflags-1.3.2//:bitflags",
"@crate_index__io-lifetimes-0.5.3//:io_lifetimes",
"@crate_index__rustix-0.33.7//:build_script_build",
],
# cfg(any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", not(target_pointer_width = "32")), target_arch = "arm", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))
(
"@rules_rust//rust/platform:aarch64-apple-darwin",
"@rules_rust//rust/platform:aarch64-apple-ios",
"@rules_rust//rust/platform:aarch64-apple-ios-sim",
"@rules_rust//rust/platform:aarch64-linux-android",
"@rules_rust//rust/platform:armv7-linux-androideabi",
"@rules_rust//rust/platform:i686-apple-darwin",
"@rules_rust//rust/platform:i686-linux-android",
"@rules_rust//rust/platform:i686-pc-windows-msvc",
"@rules_rust//rust/platform:i686-unknown-freebsd",
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu",
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf",
"@rules_rust//rust/platform:s390x-unknown-linux-gnu",
"@rules_rust//rust/platform:wasm32-unknown-unknown",
"@rules_rust//rust/platform:wasm32-wasi",
"@rules_rust//rust/platform:x86_64-apple-darwin",
"@rules_rust//rust/platform:x86_64-apple-ios",
"@rules_rust//rust/platform:x86_64-linux-android",
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
"@rules_rust//rust/platform:x86_64-unknown-freebsd",
): [
# Target Deps
"@crate_index__errno-0.2.8//:errno",
"@crate_index__libc-0.2.126//:libc",
# Common Deps
"@crate_index__bitflags-1.3.2//:bitflags",
"@crate_index__io-lifetimes-0.5.3//:io_lifetimes",
"@crate_index__rustix-0.33.7//:build_script_build",
],
# cfg(windows)
(
"@rules_rust//rust/platform:i686-pc-windows-msvc",
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
): [
# Target Deps
"@crate_index__winapi-0.3.9//:winapi",
# Common Deps
"@crate_index__bitflags-1.3.2//:bitflags",
"@crate_index__io-lifetimes-0.5.3//:io_lifetimes",
"@crate_index__rustix-0.33.7//:build_script_build",
],
"//conditions:default": [
"@crate_index__bitflags-1.3.2//:bitflags",
"@crate_index__io-lifetimes-0.5.3//:io_lifetimes",
"@crate_index__rustix-0.33.7//:build_script_build",
],
}),
proc_macro_deps = [
] + select_with_or({
"//conditions:default": [
],
}),
aliases = selects.with_or({
"//conditions:default": {
},
}),
compile_data = glob(["**"]) + select_with_or({
"//conditions:default": [
],
}),
crate_root = "src/lib.rs",
crate_features = [
"default",
"io-lifetimes",
"std",
],
data = select_with_or({
"//conditions:default": [
],
}),
edition = "2018",
rustc_env = {
},
rustc_env_files = select_with_or({
"//conditions:default": [
],
}),
rustc_flags = [
# In most cases, warnings in 3rd party crates are not interesting as
# they're out of the control of consumers. The flag here silences
# warnings. For more details see:
# https://doc.rust-lang.org/rustc/lints/levels.html
"--cap-lints=allow",
],
srcs = glob(
include = [
"**/*.rs",
],
exclude = [
],
),
version = "0.33.7",
tags = [
"cargo-bazel",
"manual",
"noclippy",
"norustfmt",
],
)
cargo_build_script(
# See comment associated with alias. Do not change this name
name = "rustix_build_script",
aliases = selects.with_or({
"//conditions:default": {
},
}),
build_script_env = {
},
compile_data = select_with_or({
"//conditions:default": [
],
}),
crate_name = "build_script_build",
crate_root = "build.rs",
crate_features = [
"default",
"io-lifetimes",
"std",
],
data = glob(["**"]) + select_with_or({
"//conditions:default": [
],
}),
deps = [
] + select_with_or({
"//conditions:default": [
],
}),
edition = "2018",
proc_macro_deps = [
] + select_with_or({
"//conditions:default": [
],
}),
rustc_env = {
},
rustc_env_files = select_with_or({
"//conditions:default": [
],
}),
rustc_flags = [
# In most cases, warnings in 3rd party crates are not interesting as
# they're out of the control of consumers. The flag here silences
# warnings. For more details see:
# https://doc.rust-lang.org/rustc/lints/levels.html
"--cap-lints=allow",
],
srcs = glob(
include = [
"**/*.rs",
],
exclude = [
],
),
tools = select_with_or({
"//conditions:default": [
],
}),
version = "0.33.7",
tags = [
"cargo-bazel",
"manual",
"noclippy",
"norustfmt",
],
visibility = ["//visibility:private"],
)
alias(
# Because `cargo_build_script` does some invisible target name mutating to
# determine the package and crate name for a build script, the Bazel
# target namename of any build script cannot be the Cargo canonical name
# of `build_script_build` without losing out on having certain Cargo
# environment variables set.
name = "build_script_build",
actual = "rustix_build_script",
tags = [
"manual",
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment