Skip to content

Commit

Permalink
Fix Android arm64 release build
Browse files Browse the repository at this point in the history
otherwise there are errors
```
ERROR at //brave/third_party/rust/sha2/v0_10/BUILD.gn:56:15 (//build/toolchain/android:android_clang_arm): Item not found
    deps -= [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
              ^----------------------------------------------
You were trying to remove "//brave/third_party/rust/cpufeatures/v0_2:lib"
from the list but it wasn't there.
See //brave/third_party/rust/ed25519_dalek_bip32/v0_2/BUILD.gn:36:5: which caused the file to be included.
    "//brave/third_party/rust/sha2/v0_10:lib",
```
- at `src/brave/third_party/rust/aes/v0_8/BUILD.gn`
- at `src/brave/third_party/rust/keccak/v0_1/BUILD.gn`
- at `src/brave/third_party/rust/sha2/v0_10/BUILD.gn`
- at `src/brave/third_party/rust/sha2/v0_9/BUILD.gn`

Happens when current_cpu=arm
  • Loading branch information
AlexeyBarabash authored and emerick committed Sep 20, 2024
1 parent 6c9117c commit 0c6aef0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion third_party/rust/aes/v0_8/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ cargo_crate("lib") {
deps += [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
}
if (target_os == "android" && target_cpu == "arm64") {
deps -= [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
deps_cpufeatures_excluded = filter_exclude(deps, [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ])
deps = []
deps = deps_cpufeatures_excluded
}
}
4 changes: 3 additions & 1 deletion third_party/rust/keccak/v0_1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ cargo_crate("lib") {
deps += [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
}
if (target_os == "android" && target_cpu == "arm64") {
deps -= [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
deps_cpufeatures_excluded = filter_exclude(deps, [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ])
deps = []
deps = deps_cpufeatures_excluded
}
}
4 changes: 3 additions & 1 deletion third_party/rust/sha2/v0_10/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ cargo_crate("lib") {
}
features = [ "std" ]
if (target_os == "android" && target_cpu == "arm64") {
deps -= [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
deps_cpufeatures_excluded = filter_exclude(deps, [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ])
deps = []
deps = deps_cpufeatures_excluded
}
}
4 changes: 3 additions & 1 deletion third_party/rust/sha2/v0_9/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ cargo_crate("lib") {
}
features = [ "std" ]
if (target_os == "android" && target_cpu == "arm64") {
deps -= [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ]
deps_cpufeatures_excluded = filter_exclude(deps, [ "//brave/third_party/rust/cpufeatures/v0_2:lib" ])
deps = []
deps = deps_cpufeatures_excluded
}
}

0 comments on commit 0c6aef0

Please sign in to comment.