Skip to content

Commit

Permalink
Explicitly enable std on the indexmap crate
Browse files Browse the repository at this point in the history
The `indexmap` crate tries to detect with a build script whether
the `std` library crate is available. This fails on our android
integration builds:

    ACTION //brave/third_party/rust/indexmap/v1:indexmap_lib_v1_build_script_output(//build/toolchain/android:android_clang_x86)
    error[E0463]: can't find crate for `std`
      |
      = note: the `i686-linux-android` target may not be installed

However, the check can be overridden by explicitly requesting the
feature, and here we do so in our build. This is the default in the
newer v2 release of the crate, so this change is likely to remain
correct going forward.
  • Loading branch information
rillian committed Jan 25, 2024
1 parent b7b3517 commit 2ecf050
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/rust/indexmap/v1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ cargo_crate("lib") {
build_deps = [ "//third_party/rust/autocfg/v1:buildrs_support" ]
build_root = "crate/build.rs"
build_sources = [ "crate/build.rs" ]

# Explicitly enable `std` to avoid autocfg issues on android.
features = [ "std" ]
}

0 comments on commit 2ecf050

Please sign in to comment.