Upgrade Android builds to use C++14

PiperOrigin-RevId: 291739095
Change-Id: I39de89127b31a431a1ce884ad6b52b7e8db5e65e
This commit is contained in:
Jared Duke 2020-01-27 09:34:30 -08:00 committed by TensorFlower Gardener
parent a16f6044a4
commit 5adb929c26
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ set_target_properties(lib_tf PROPERTIES IMPORTED_LOCATION
# TODO: Consider options other than -O2 for binary size.
# e.g. -Os for gcc, and -Oz for clang.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIS_SLIM_BUILD \
-std=c++11 -fno-rtti -fno-exceptions \
-std=c++14 -fno-rtti -fno-exceptions \
-O2 -Wno-narrowing -fomit-frame-pointer \
-mfpu=neon -mfloat-abi=softfp -fPIE -fPIC \
-ftemplate-depth=900 \

View File

@ -41,7 +41,7 @@ for CPU in ${CPUS//,/ }
do
echo "========== Building native libs for Android ${CPU} =========="
bazel build --config=monolithic --cpu=${CPU} \
--compilation_mode=opt --cxxopt=-std=c++11 \
--compilation_mode=opt --cxxopt=-std=c++14 \
--crosstool_top=//external:android/crosstool \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
//tensorflow/core:android_tensorflow_lib \
@ -64,7 +64,7 @@ done
# TODO(gunan): remove extra flags once sandboxing is enabled for all builds.
echo "========== Building TensorFlow Android Jar and Demo =========="
bazel --bazelrc=/dev/null build --config=monolithic --fat_apk_cpu=${CPUS} \
--compilation_mode=opt --cxxopt=-std=c++11 \
--compilation_mode=opt --cxxopt=-std=c++14 \
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
//tensorflow/tools/android/inference_interface:android_tensorflow_inference_java \
//tensorflow/tools/android/inference_interface:android_tensorflow_inference_java.aar \