Skip to content

Commit

Permalink
Disable warnings in 3p Rust crates
Browse files Browse the repository at this point in the history
This will allow us to turn warnings into errors elsewhere.

To avoid problems in the future, write the rules into each cargo_crate
that we pull in from 3p, so that in the case we pull in or use Rust
libraries with Cargo.toml that we don't want to treat as 3p, we can
keep warnings on for those.

R=collinbaker@chromium.org

Bug: 1257589, 1293836
Change-Id: I3354b2de2dd7630ae99f80b3e49db1605eaa1b35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4035505
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Collin Baker <collinbaker@chromium.org>
Commit-Queue: Collin Baker <collinbaker@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1073600}
  • Loading branch information
danakj authored and Chromium LUCI CQ committed Nov 18, 2022
1 parent 244f49c commit 91faf77
Show file tree
Hide file tree
Showing 110 changed files with 455 additions and 35 deletions.
34 changes: 3 additions & 31 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1796,37 +1796,9 @@ config("no_chromium_code") {
}
}

# Rust warnings to ignore in third party dependencies. This list is
# built from those warnings which are currently in our various Rust
# third party dependencies, but aren't serious (they're largely
# stylistic).
# An alternative policy would be to suppress all warnings in third
# party Rust code using "--cap-lints allow". This is what cargo does
# for code outside your own crate, so is worth considering if it
# turns out that maintaining this list is onerous.
# (https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints)
rustflags = [
"-A",
"unused_parens",
"-A",
"bare_trait_objects",
"-A",
"non_fmt_panics",
"-A",
"redundant_semicolons",
"-A",
"unused_parens",
"-A",
"anonymous_parameters",
"-A",
"bare_trait_objects",
"-A",
"deprecated",
"-A",
"non_camel_case_types",
"-A",
"unused_imports",
]
# Suppress all warnings in third party, as Cargo does:
# https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
rustflags = [ "--cap-lints=allow" ]

configs = [ ":default_warnings" ]
}
Expand Down
4 changes: 0 additions & 4 deletions build/rust/cargo_crate.gni
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,5 @@ template("cargo_crate") {

set_defaults("cargo_crate") {
library_configs = default_compiler_configs
library_configs -= [ "//build/config/compiler:chromium_code" ]
library_configs += [ "//build/config/compiler:no_chromium_code" ]
executable_configs = default_executable_configs
executable_configs -= [ "//build/config/compiler:chromium_code" ]
executable_configs += [ "//build/config/compiler:no_chromium_code" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/addr2line/v0_17/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ cargo_crate("lib") {
cargo_pkg_name = "addr2line"
cargo_pkg_description =
"A cross-platform symbolication library written in Rust, using `gimli`"
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" ]
deps = [ "//third_party/rust/gimli/v0_26:lib" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/adler/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ cargo_crate("lib") {
cargo_pkg_name = "adler"
cargo_pkg_description =
"A simple clean-room implementation of the Adler-32 checksum"
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" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/aho_corasick/v0_7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Andrew Gallant <jamslam@gmail.com>"
cargo_pkg_name = "aho-corasick"
cargo_pkg_description = "Fast multiple substring searching."
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" ]
deps = [ "//third_party/rust/memchr/v2:lib" ]
features = [ "std" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/aquamarine/v0_1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Mike Lubinets <git@mkl.dev>"
cargo_pkg_name = "aquamarine"
cargo_pkg_description = "A mermaid.js integration for rustdoc"
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" ]
deps = [
"//third_party/rust/itertools/v0_9:lib",
"//third_party/rust/proc_macro2/v1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/atty/v0_2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "softprops <d.tangren@gmail.com>"
cargo_pkg_name = "atty"
cargo_pkg_description = "A simple interface for querying atty"
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" ]
deps = []
if (!is_win) {
deps += [ "//third_party/rust/libc/v0_2:lib" ]
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocfg/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ cargo_crate("buildrs_support") {
cargo_pkg_authors = "Josh Stone <cuviper@gmail.com>"
cargo_pkg_name = "autocfg"
cargo_pkg_description = "Automatic cfg for Rust compiler features"
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" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/autocxx/v0_23/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>"
cargo_pkg_name = "autocxx"
cargo_pkg_description = "Safe autogenerated interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/aquamarine/v0_1:lib",
"//third_party/rust/autocxx_macro/v0_23:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocxx_bindgen/v0_62/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Jyun-Yan You <jyyou.tw@gmail.com>, Emilio Cobos Álvarez <emilio@crisal.io>, Nick Fitzgerald <fitzgen@gmail.com>, The Servo project developers, Adrian Taylor <ade@hohum.me.uk>"
cargo_pkg_name = "autocxx-bindgen"
cargo_pkg_description = "Automatically generates Rust FFI bindings to C and C++ libraries. Version adjusted for autocxx."
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" ]
deps = [
"//third_party/rust/bitflags/v1:lib",
"//third_party/rust/cexpr/v0_6:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocxx_engine/v0_23/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>"
cargo_pkg_name = "autocxx-engine"
cargo_pkg_description = "Safe autogenerated interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/aquamarine/v0_1:lib",
"//third_party/rust/autocxx_bindgen/v0_62:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocxx_gen/v0_23/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ cargo_crate("autocxx_gen") {
cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>"
cargo_pkg_name = "autocxx-gen"
cargo_pkg_description = "Safe autogenerated interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/autocxx_engine/v0_23:lib",
"//third_party/rust/clap/v3:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocxx_macro/v0_23/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>"
cargo_pkg_name = "autocxx-macro"
cargo_pkg_description = "Safe autogenerated interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/autocxx_parser/v0_23:lib",
"//third_party/rust/proc_macro2/v1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/autocxx_parser/v0_23/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>"
cargo_pkg_name = "autocxx-parser"
cargo_pkg_description = "Safe autogenerated interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/indexmap/v1:lib",
"//third_party/rust/itertools/v0_10:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/backtrace/v0_3/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "The Rust Project Developers"
cargo_pkg_name = "backtrace"
cargo_pkg_description = "A library to acquire a stack trace (backtrace) at runtime in a Rust program."
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" ]
deps = [
"//third_party/rust/addr2line/v0_17:lib",
"//third_party/rust/cfg_if/v1:lib",
Expand Down
8 changes: 8 additions & 0 deletions third_party/rust/bindgen/v0_60/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ cargo_crate("bindgen") {
cargo_pkg_name = "bindgen"
cargo_pkg_description =
"Automatically generates Rust FFI bindings to C and C++ libraries."
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" ]
deps = [
":lib",
"//third_party/rust/bitflags/v1:lib",
Expand Down Expand Up @@ -66,6 +70,10 @@ cargo_crate("lib") {
cargo_pkg_name = "bindgen"
cargo_pkg_description =
"Automatically generates Rust FFI bindings to C and C++ libraries."
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" ]
deps = [
"//third_party/rust/bitflags/v1:lib",
"//third_party/rust/cexpr/v0_6:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/bitflags/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ cargo_crate("lib") {
cargo_pkg_name = "bitflags"
cargo_pkg_description =
"A macro to generate structures which behave like bitflags."
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" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/camino/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Without Boats <saoirse@without.boats>, Ashley Williams <ashley666ashley@gmail.com>, Steve Klabnik <steve@steveklabnik.com>, Rain <rain@sunshowers.io>"
cargo_pkg_name = "camino"
cargo_pkg_description = "UTF-8 paths"
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" ]
deps = [ "//third_party/rust/serde/v1:lib" ]
features = [
"serde",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cargo_metadata/v0_14/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ cargo_crate("lib") {
"Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>"
cargo_pkg_name = "cargo_metadata"
cargo_pkg_description = "structured access to the output of `cargo metadata`"
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" ]
deps = [
"//third_party/rust/camino/v1:lib",
"//third_party/rust/cargo_platform/v0_1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cargo_platform/v0_1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "The Cargo Project Developers"
cargo_pkg_name = "cargo-platform"
cargo_pkg_description = "Cargo's representation of a target platform."
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" ]
deps = [ "//third_party/rust/serde/v1:lib" ]
}
group("test_support") {
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cexpr/v0_6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ cargo_crate("lib") {
cargo_pkg_authors = "Jethro Beekman <jethro@jbeekman.nl>"
cargo_pkg_name = "cexpr"
cargo_pkg_description = "A C expression parser and evaluator"
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" ]
deps = [ "//third_party/rust/nom/v7:lib" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/cfg_if/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ cargo_crate("lib") {
cargo_pkg_authors = "Alex Crichton <alex@alexcrichton.com>"
cargo_pkg_name = "cfg-if"
cargo_pkg_description = "A macro to ergonomically define an item depending on a large number of #[cfg]parameters. Structured like an if-else chain, the first matching branch is theitem that gets emitted."
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" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/clang_sys/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "Kyle Mayes <kyle@mayeses.com>"
cargo_pkg_name = "clang-sys"
cargo_pkg_description = "Rust bindings for libclang."
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" ]
deps = [
"//third_party/rust/glob/v0_3:lib",
"//third_party/rust/libc/v0_2:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/clap/v3/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ cargo_crate("lib") {
cargo_pkg_version = "3.1.12"
cargo_pkg_name = "clap"
cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
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" ]
deps = [
"//third_party/rust/atty/v0_2:lib",
"//third_party/rust/bitflags/v1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/clap_lex/v0_1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ cargo_crate("lib") {
cargo_pkg_version = "0.1.1"
cargo_pkg_name = "clap_lex"
cargo_pkg_description = "Minimal, flexible command line parser"
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" ]
deps = [ "//third_party/rust/os_str_bytes/v6:lib" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/codespan_reporting/v0_11/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ cargo_crate("lib") {
cargo_pkg_name = "codespan-reporting"
cargo_pkg_description =
"Beautiful diagnostic reporting for text-based programming languages"
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" ]
deps = [
"//third_party/rust/termcolor/v1:lib",
"//third_party/rust/unicode_width/v0_1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cxx/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "David Tolnay <dtolnay@gmail.com>"
cargo_pkg_name = "cxx"
cargo_pkg_description = "Safe interop between Rust and C++"
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" ]
deps = [
"//third_party/rust/cxxbridge_macro/v1:lib",
"//third_party/rust/link_cplusplus/v1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cxx_gen/v0_7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ cargo_crate("lib") {
cargo_pkg_name = "cxx-gen"
cargo_pkg_description =
"C++ code generator for integrating `cxx` crate into higher level tools."
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" ]
deps = [
"//third_party/rust/codespan_reporting/v0_11:lib",
"//third_party/rust/proc_macro2/v1:lib",
Expand Down
8 changes: 8 additions & 0 deletions third_party/rust/cxxbridge_cmd/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ cargo_crate("cxxbridge") {
cargo_pkg_name = "cxxbridge-cmd"
cargo_pkg_description =
"C++ code generator for integrating `cxx` crate into a non-Cargo build."
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" ]
deps = [
":lib",
"//third_party/rust/clap/v3:lib",
Expand All @@ -41,6 +45,10 @@ cargo_crate("lib") {
cargo_pkg_name = "cxxbridge-cmd"
cargo_pkg_description =
"C++ code generator for integrating `cxx` crate into a non-Cargo build."
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" ]
deps = [
"//third_party/rust/clap/v3:lib",
"//third_party/rust/codespan_reporting/v0_11:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/cxxbridge_macro/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "David Tolnay <dtolnay@gmail.com>"
cargo_pkg_name = "cxxbridge-macro"
cargo_pkg_description = "Implementation detail of the `cxx` crate."
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" ]
deps = [
"//third_party/rust/proc_macro2/v1:lib",
"//third_party/rust/quote/v1:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/either/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ cargo_crate("lib") {
cargo_pkg_authors = "bluss"
cargo_pkg_name = "either"
cargo_pkg_description = "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases."
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" ]
features = [ "use_std" ]
}
4 changes: 4 additions & 0 deletions third_party/rust/env_logger/v0_9/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cargo_crate("lib") {
cargo_pkg_authors = "The Rust Project Developers"
cargo_pkg_name = "env_logger"
cargo_pkg_description = "A logging implementation for `log` which is configured via an environmentvariable."
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" ]
deps = [
"//third_party/rust/atty/v0_2:lib",
"//third_party/rust/humantime/v2:lib",
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/fastrand/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ cargo_crate("lib") {
cargo_pkg_authors = "Stjepan Glavina <stjepang@gmail.com>"
cargo_pkg_name = "fastrand"
cargo_pkg_description = "A simple and fast random number generator"
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" ]
}
Loading

0 comments on commit 91faf77

Please sign in to comment.