Skip to content

Commit daec6e0

Browse files
bmzhaotensorflower-gardener
authored andcommitted
Upgrading bazel version to 2.0.0
This is necessary to start using bazel's experimental cc_shared_library support. This change is part of the refactoring described in tensorflow/community#179 PiperOrigin-RevId: 294736824 Change-Id: I8d13c71545cf2f2edd47818b40fa413e3e9c3254
1 parent b547fea commit daec6e0

File tree

12 files changed

+18
-11
lines changed

12 files changed

+18
-11
lines changed

.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ build --define=grpc_no_ares=true
222222
# archives in -whole_archive -no_whole_archive.
223223
build --noincompatible_remove_legacy_whole_archive
224224

225+
# These are bazel 2.0's incompatible flags. Tensorflow needs to use bazel 2.0.0
226+
# to use cc_shared_library, as part of the Tensorflow Build Improvements RFC:
227+
# https://github.com/tensorflow/community/pull/179
228+
build --noincompatible_remap_main_repo
229+
query --noincompatible_remap_main_repo
230+
build --noincompatible_prohibit_aapt1
231+
225232
# Modular TF build options
226233
build:dynamic_kernels --define=dynamic_loaded_kernels=true
227234
build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.1
1+
2.0.0

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
_TF_BAZELRC = ''
5151
_TF_CURRENT_BAZEL_VERSION = None
5252
_TF_MIN_BAZEL_VERSION = '1.2.1'
53-
_TF_MAX_BAZEL_VERSION = '1.2.1'
53+
_TF_MAX_BAZEL_VERSION = '2.0.0'
5454

5555
NCCL_LIB_PATHS = [
5656
'lib64/', 'lib/powerpc64le-linux-gnu/', 'lib/x86_64-linux-gnu/', ''

tensorflow/tools/ci_build/install/install_bazel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# ==============================================================================
1616

1717
# Select bazel version.
18-
BAZEL_VERSION="1.2.1"
18+
BAZEL_VERSION="2.0.0"
1919

2020
set +e
2121
local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}')

tensorflow/tools/ci_build/install/install_bazel_from_source.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# It will compile bazel from source and install it in /usr/local/bin
1919

2020
# Select bazel version.
21-
BAZEL_VERSION="1.2.1"
21+
BAZEL_VERSION="2.0.0"
2222

2323
set +e
2424
local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}')

tensorflow/tools/ci_build/release/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Keep in sync with tensorflow_estimator and configure.py.
1919
# LINT.IfChange
20-
LATEST_BAZEL_VERSION=1.2.1
20+
LATEST_BAZEL_VERSION=2.0.0
2121
# LINT.ThenChange(
2222
# //tensorflow/opensource_only/configure.py,
2323
# //tensorflow_estimator/google/kokoro/common.sh,

tensorflow/tools/ci_build/release/common_win.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ SET PATH=%CUDNN_INSTALL_PATH%\bin;%PATH%
7373
@REM Setup Bazel
7474
@REM
7575
:: Download Bazel from github and make sure its found in PATH.
76-
SET BAZEL_VERSION=1.2.1
76+
SET BAZEL_VERSION=2.0.0
7777
md C:\tools\bazel\
7878
wget -q https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.exe -O C:/tools/bazel/bazel.exe
7979
SET PATH=C:\tools\bazel;%PATH%

tensorflow/tools/dockerfiles/dockerfiles/devel-cpu-jupyter.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ RUN ${PIP} --no-cache-dir install \
100100
enum34
101101

102102
# Install bazel
103-
ARG BAZEL_VERSION=1.2.1
103+
ARG BAZEL_VERSION=2.0.0
104104
RUN mkdir /bazel && \
105105
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
106106
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

tensorflow/tools/dockerfiles/dockerfiles/devel-cpu.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ RUN ${PIP} --no-cache-dir install \
100100
enum34
101101

102102
# Install bazel
103-
ARG BAZEL_VERSION=1.2.1
103+
ARG BAZEL_VERSION=2.0.0
104104
RUN mkdir /bazel && \
105105
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
106106
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ RUN ${PIP} --no-cache-dir install \
142142
enum34
143143

144144
# Install bazel
145-
ARG BAZEL_VERSION=1.2.1
145+
ARG BAZEL_VERSION=2.0.0
146146
RUN mkdir /bazel && \
147147
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
148148
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

0 commit comments

Comments
 (0)