From 2ecf050248bb7a35d869f5c37d3e9b68b5e95f9d Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Thu, 18 Jan 2024 09:40:20 -0800 Subject: [PATCH] Explicitly enable std on the indexmap crate 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. --- third_party/rust/indexmap/v1/BUILD.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/rust/indexmap/v1/BUILD.gn b/third_party/rust/indexmap/v1/BUILD.gn index 37bb490e6ae9..e92308ef3e04 100644 --- a/third_party/rust/indexmap/v1/BUILD.gn +++ b/third_party/rust/indexmap/v1/BUILD.gn @@ -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" ] }