Skip to content

Commit

Permalink
Add --fat_apk_cpu=arm64-v8a for arm64 Android builds
Browse files Browse the repository at this point in the history
Bazel silently uses the wrong build settings for --config=android_arm64 (--cpu=arm64-v8a is not enough), and actually still uses armeabi-v7a in at least some cases. --fat_apk_cpu fixes this.

See tensorflow#15581 for more.

PiperOrigin-RevId: 181525260
  • Loading branch information
angerson authored and tensorflower-gardener committed Jan 10, 2018
1 parent b152f05 commit 0f68a22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/bazel.rc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Android configs
# Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the
# target CPU to build transient dependencies correctly. See
# https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu
build:android --crosstool_top=//external:android/crosstool
build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
build:android_arm --config=android
build:android_arm --cpu=armeabi-v7a
build:android_arm --fat_apk_cpu=armeabi-v7a
build:android_arm64 --config=android
build:android_arm64 --cpu=arm64-v8a
build:android_arm64 --fat_apk_cpu=arm64-v8a

# Config to use a mostly-static build and disable modular op registration
# support (this will revert to loading TensorFlow with RTLD_GLOBAL in Python).
Expand Down

0 comments on commit 0f68a22

Please sign in to comment.