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 https://github.com/tensorflow/community/pull/179

PiperOrigin-RevId: 294736824
Change-Id: I8d13c71545cf2f2edd47818b40fa413e3e9c3254
This commit is contained in:
Brian Zhao 2020-02-12 13:07:54 -08:00 committed by TensorFlower Gardener
parent b547feade6
commit daec6e0af0
12 changed files with 18 additions and 11 deletions

View File

@ -222,6 +222,13 @@ build --define=grpc_no_ares=true
# archives in -whole_archive -no_whole_archive.
build --noincompatible_remove_legacy_whole_archive
# These are bazel 2.0's incompatible flags. Tensorflow needs to use bazel 2.0.0
# to use cc_shared_library, as part of the Tensorflow Build Improvements RFC:
# https://github.com/tensorflow/community/pull/179
build --noincompatible_remap_main_repo
query --noincompatible_remap_main_repo
build --noincompatible_prohibit_aapt1
# Modular TF build options
build:dynamic_kernels --define=dynamic_loaded_kernels=true
build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS

View File

@ -1 +1 @@
1.2.1
2.0.0

View File

@ -50,7 +50,7 @@ _TF_WORKSPACE_ROOT = ''
_TF_BAZELRC = ''
_TF_CURRENT_BAZEL_VERSION = None
_TF_MIN_BAZEL_VERSION = '1.2.1'
_TF_MAX_BAZEL_VERSION = '1.2.1'
_TF_MAX_BAZEL_VERSION = '2.0.0'
NCCL_LIB_PATHS = [
'lib64/', 'lib/powerpc64le-linux-gnu/', 'lib/x86_64-linux-gnu/', ''

View File

@ -15,7 +15,7 @@
# ==============================================================================
# Select bazel version.
BAZEL_VERSION="1.2.1"
BAZEL_VERSION="2.0.0"
set +e
local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}')

View File

@ -18,7 +18,7 @@
# It will compile bazel from source and install it in /usr/local/bin
# Select bazel version.
BAZEL_VERSION="1.2.1"
BAZEL_VERSION="2.0.0"
set +e
local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}')

View File

@ -17,7 +17,7 @@
# Keep in sync with tensorflow_estimator and configure.py.
# LINT.IfChange
LATEST_BAZEL_VERSION=1.2.1
LATEST_BAZEL_VERSION=2.0.0
# LINT.ThenChange(
# //tensorflow/opensource_only/configure.py,
# //tensorflow_estimator/google/kokoro/common.sh,

View File

@ -73,7 +73,7 @@ SET PATH=%CUDNN_INSTALL_PATH%\bin;%PATH%
@REM Setup Bazel
@REM
:: Download Bazel from github and make sure its found in PATH.
SET BAZEL_VERSION=1.2.1
SET BAZEL_VERSION=2.0.0
md C:\tools\bazel\
wget -q https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.exe -O C:/tools/bazel/bazel.exe
SET PATH=C:\tools\bazel;%PATH%

View File

@ -100,7 +100,7 @@ RUN ${PIP} --no-cache-dir install \
enum34
# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=2.0.0
RUN mkdir /bazel && \
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

View File

@ -100,7 +100,7 @@ RUN ${PIP} --no-cache-dir install \
enum34
# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=2.0.0
RUN mkdir /bazel && \
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

View File

@ -142,7 +142,7 @@ RUN ${PIP} --no-cache-dir install \
enum34
# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=2.0.0
RUN mkdir /bazel && \
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

View File

@ -142,7 +142,7 @@ RUN ${PIP} --no-cache-dir install \
enum34
# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=2.0.0
RUN mkdir /bazel && \
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \

View File

@ -24,7 +24,7 @@ RUN ${PIP} --no-cache-dir install \
enum34
# Install bazel
ARG BAZEL_VERSION=1.2.1
ARG BAZEL_VERSION=2.0.0
RUN mkdir /bazel && \
wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \