aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Ilya Biryukov <ibiryukov@google.com>2018-03-22 05:33:42 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-22 05:36:18 -0700
commit9e651e4571f7b7c2d32bdafe43cc4ced9bb0c750 (patch)
tree969e4652bf4774e474ac8449df53a14761f156ab /tools
parentf9ccb89134d89469ae962bba832e78d1f116b96b (diff)
Allow to download clang and use clang for CPU builds.
Previously we only allowed to download clang when doing GPU builds. The added skylark files use bazel's autoconf scripts, which were only added in 0.10.0. To provide nice error message for older versions of bazel (i.e. 'version is less than 0.10' vs 'can't load @bazel_tools/cpp/...'), we move the bazel version check into WORKSPACE file from workspace.bzl. PiperOrigin-RevId: 190050798
Diffstat (limited to 'tools')
-rw-r--r--tools/bazel.rc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bazel.rc b/tools/bazel.rc
index 8b8c717561..1c1e6afb65 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
@@ -27,11 +27,14 @@ build --define framework_shared_object=true
build:mkl --define=using_mkl=true
build:mkl -c opt
+build:download_clang --crosstool_top=@local_config_download_clang//:toolchain
+build:download_clang --define=using_clang=true
+
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true
build:cuda_clang --crosstool_top=@local_config_cuda//crosstool:toolchain
-build:cuda_clang --define=using_cuda=true --define=using_cuda_clang=true
+build:cuda_clang --define=using_cuda=true --define=using_cuda_clang=true --define=using_clang=true
build:win-cuda --define=using_cuda=true --define=using_cuda_nvcc=true