Skip to content

Commit

Permalink
Fix android armeabi-v7a constraint
Browse files Browse the repository at this point in the history
Previously this was arm instead of armv7. It seems that armv7 is the
correct constraint for this case.

Fixes bazelbuild#14982
  • Loading branch information
keith committed Apr 14, 2022
1 parent 6872fd2 commit adbc734
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private static String getPlatformCpuLabel(String targetCpu) {
case "x86":
return "x86_32";
case "armeabi-v7a":
return "arm";
return "armv7";
case "arm64-v8a":
return "aarch64";
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ cc_binary(
platform(
name = 'android_arm',
constraint_values = ['@bazel_tools//platforms:arm', '@bazel_tools//platforms:android'],
constraint_values = ['@platforms//cpu:armv7', '@bazel_tools//platforms:android'],
visibility = ['//visibility:public']
)
EOF
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/testenv.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ platform(
name = "simple",
constraint_values = [
"@bazel_tools//platforms:android",
"@bazel_tools//platforms:arm",
"@platforms//cpu:armv7",
],
)
EOF
Expand Down
2 changes: 1 addition & 1 deletion tools/cpp/BUILD.static.bsd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ toolchain(
"@platforms//cpu:arm",
],
target_compatible_with = [
"@platforms//cpu:arm",
"@platforms//cpu:armv7",
"@platforms//os:android",
],
toolchain = ":cc-compiler-armeabi-v7a",
Expand Down
2 changes: 1 addition & 1 deletion tools/cpp/BUILD.toolchains.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ toolchain(
name = "cc-toolchain-armeabi-v7a",
exec_compatible_with = HOST_CONSTRAINTS,
target_compatible_with = [
"@platforms//cpu:arm",
"@platforms//cpu:armv7",
"@platforms//os:android",
],
toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
Expand Down
4 changes: 2 additions & 2 deletions tools/cpp/BUILD.windows.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ toolchain(
exec_compatible_with = [
],
target_compatible_with = [
"@platforms//cpu:arm",
"@platforms//cpu:armv7",
"@platforms//os:android",
],
toolchain = ":cc-compiler-armeabi-v7a",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
)
2 changes: 1 addition & 1 deletion tools/osx/crosstool/BUILD.toolchains
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports_files(["osx_archs.bzl"])
# Target constraints for each arch.
# TODO(apple-rules): Rename osx constraint to macOS.
OSX_TOOLS_CONSTRAINTS = {
"armeabi-v7a": ["@platforms//cpu:arm"],
"armeabi-v7a": ["@platforms//cpu:armv7"],
"darwin_arm64": [
"@platforms//os:osx",
"@platforms//cpu:arm64",
Expand Down

0 comments on commit adbc734

Please sign in to comment.