Skip to content

Commit

Permalink
Add --incompatible_enable_android_toolchain_resolution=false to .ba…
Browse files Browse the repository at this point in the history
…zelrc

* This will fix the build failure for Android lib.
* This option is required for Bazel 7.0.0 and later to keep using `--fat_apk_cpu`.
* `--fat_apk_cpu` should be replaced with `--android_platforms`.

bazelbuild/bazel@05bea52

#codehealth

PiperOrigin-RevId: 592560564
  • Loading branch information
hiroyuki-komatsu committed Dec 20, 2023
1 parent d806e1e commit 68fea8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ build:prod_windows --define TARGET=prod_windows --build_tag_filters=-nowin

# Android / OSS Android (same configurations)
build:android --define TARGET=oss_android --copt "-DOS_ANDROID"
build:android --android_crosstool_top=@androidndk//:toolchain --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64
build:android --android_crosstool_top=@androidndk//:toolchain
# --fat_apk_cpu should be replaced with --android_platforms
# https://github.com/bazelbuild/bazel/commit/05bea52ed3159aa5d15d967f5f56fc084a2b6c73
build:android --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64 --incompatible_enable_android_toolchain_resolution=false
build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
build:android --build_tag_filters=-noandroid
test:android --test_tag_filters=-noandroid
build:oss_android --define TARGET=oss_android --copt "-DOS_ANDROID"
build:oss_android --android_crosstool_top=@androidndk//:toolchain --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64
build:oss_android --android_crosstool_top=@androidndk//:toolchain
# --fat_apk_cpu should be replaced with --android_platforms
# https://github.com/bazelbuild/bazel/commit/05bea52ed3159aa5d15d967f5f56fc084a2b6c73
build:oss_android --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64 --incompatible_enable_android_toolchain_resolution=false
build:oss_android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
build:oss_android --build_tag_filters=-noandroid
test:oss_android --test_tag_filters=-noandroid
2 changes: 1 addition & 1 deletion src/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ load(
apple_support_dependencies()


# Android NDK setup
# Android NDK setup (2023-01-13)
RULES_ANDROID_NDK_COMMIT= "44dcd014f4b126f8941c29ff1b25e1584bd3eb26"
RULES_ANDROID_NDK_SHA = "79b1857e8e05e3007ad090a3269d2932e988b3ed176d7abd042719d45eb51500"
http_archive(
Expand Down

0 comments on commit 68fea8a

Please sign in to comment.