diff options
author | Michael Case <mikecase@google.com> | 2018-01-05 14:09:41 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-05 14:13:39 -0800 |
commit | d31531af15769f00e8026318167875e1969eac1c (patch) | |
tree | 4dac1da507ced2bfe60ea44768ae8fbaf0bb5af6 /tools | |
parent | ca6f0dd19b127c08e5e2cd7d0e6e9240881e6afa (diff) |
Move some build configs to tools/bazel.rc from configure.py
Moving --config=android_arm --config=mkl and --config=monolithic
build configs into tools/bazel.rc. These options are just always
written the same way to .bazelrc when configure.py is run. This
should trim down the scope of configure.py and make it easier to
build TF without running configure.py prior.
PiperOrigin-RevId: 180973131
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bazel.rc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/bazel.rc b/tools/bazel.rc index 04c24d7511..44bfe9f0c2 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -1,3 +1,28 @@ +# Android configs +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_arm64 --config=android +build:android_arm64 --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). +# By default, TensorFlow will build with a dependence on +# //tensorflow:libtensorflow_framework.so. +build:monolithic --define framework_shared_object=false + +# For projects which use TensorFlow as part of a Bazel build process, putting +# nothing in a bazelrc will default to a monolithic build. The following line +# opts in to modular op registration support by default. +build --define framework_shared_object=true + +# Please note that MKL on MacOS or windows is still not supported. +# If you would like to use a local MKL instead of downloading, please set the +# environment variable "TF_MKL_ROOT" every time before build. +build:mkl --define=using_mkl=true +build:mkl -c opt + build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true |