aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-27 06:19:58 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-27 06:23:37 -0700
commit77e2686a2958eb76e0164828d5d536b86c72464b (patch)
tree08dd3d4637f6fd170a5fe353853825b98e943c74 /configure.py
parentabf26356209cba1ba895a06d9ce55ad01dad7fc6 (diff)
Reduce the size of //tensorflow/tools/pip_package:simple_console_windows
This change reduce the size of //tensorflow/tools/pip_package:simple_console_windows's zip file from 1000027677 bytes to 47690474 bytes for a CPU build. For GPU build, it will avoid going over 4GB when multiple CUDA compatibility are specified. To fix #22390 PiperOrigin-RevId: 214764423
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index f42da2cbb1..3fcaaa9d0e 100644
--- a/configure.py
+++ b/configure.py
@@ -1440,6 +1440,14 @@ def set_windows_build_flags(environ_cp):
# TODO(pcloudy): Remove this flag when upgrading Bazel to 0.16.0
# Short object file path will be enabled by default.
write_to_bazelrc('build --experimental_shortened_obj_file_path=true')
+ # When building zip file for some py_binary and py_test targets, don't
+ # include its dependencies. This is for:
+ # 1. Running python tests against the system installed TF pip package.
+ # 2. Avoiding redundant files in
+ # //tensorflow/tools/pip_package:simple_console_windows,
+ # which is a py_binary used during creating TF pip package.
+ # See https://github.com/tensorflow/tensorflow/issues/22390
+ write_to_bazelrc('build --define=no_tensorflow_py_deps=true')
if get_var(
environ_cp, 'TF_OVERRIDE_EIGEN_STRONG_INLINE', 'Eigen strong inline',