chromium/third_party/rust/getrandom/v0_2/BUILD.gn

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# @generated from third_party/rust/chromium_crates_io/BUILD.gn.hbs by
# tools/crates/gnrt.
# Do not edit!

import("//build/rust/cargo_crate.gni")

cargo_crate("lib") {
  crate_name = "getrandom"
  epoch = "0.2"
  crate_type = "rlib"
  crate_root =
      "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/lib.rs"
  sources = [
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/apple-other.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/custom.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/error.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/error_impls.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/espidf.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/fuchsia.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/getentropy.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/getrandom.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/hermit.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/js.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/lazy.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/lib.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/linux_android.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/linux_android_with_fallback.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/netbsd.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/rdrand.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/solaris.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/solid.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/use_file.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/util.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/util_libc.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/vxworks.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/wasi.rs",
    "//third_party/rust/chromium_crates_io/vendor/getrandom-0.2.15/src/windows.rs",
  ]
  inputs = []

  build_native_rust_unit_tests = false
  edition = "2018"
  cargo_pkg_version = "0.2.15"
  cargo_pkg_authors = "The Rand Project Developers"
  cargo_pkg_name = "getrandom"
  cargo_pkg_description = "A small cross-platform library for retrieving random data from system source"
  library_configs -= [ "//build/config/compiler:chromium_code" ]
  library_configs += [ "//build/config/compiler:no_chromium_code" ]
  executable_configs -= [ "//build/config/compiler:chromium_code" ]
  executable_configs += [ "//build/config/compiler:no_chromium_code" ]
  proc_macro_configs -= [ "//build/config/compiler:chromium_code" ]
  proc_macro_configs += [ "//build/config/compiler:no_chromium_code" ]
  deps = [ "//third_party/rust/cfg_if/v1:lib" ]
  if (!is_win) {
    deps += [ "//third_party/rust/libc/v0_2:lib" ]
  }
  features = [ "std" ]

  # Only for usage from third-party crates. Add the crate to
  # //third_party/rust/chromium_crates_io/Cargo.toml to use
  # it from first-party code.
  visibility = [ "//third_party/rust/*" ]
  testonly = true
}