aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.py
diff options
context:
space:
mode:
authorGravatar Ilya Biryukov <ibiryukov@google.com>2018-09-04 03:09:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-04 03:15:01 -0700
commit1c3d02eb3594e9d92cd26562e797142ee34505b2 (patch)
tree72fe9f6b489c76f4db86699f37209f57938f6eb2 /configure.py
parentd45cd10714906326ab1e27a82260a8dc56028671 (diff)
Use LLD when building with downloaded GPU toolchain
This improves build times when using the downloaded clang toolchain. Additionally, remove '-B/usr/bin' flags from the cuda CROSSTOOL when using the downloaded toolchain. It was forcing 'clang' to first search for the linker in '/usr/bin', preventing downloaded LLD from being selected. PiperOrigin-RevId: 211430374
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index 7edab53964..361bd4764d 100644
--- a/configure.py
+++ b/configure.py
@@ -1543,6 +1543,10 @@ def main():
if environ_cp.get('TF_DOWNLOAD_CLANG') != '1':
# Set up which clang we should use as the cuda / host compiler.
set_clang_cuda_compiler_path(environ_cp)
+ else:
+ # Use downloaded LLD for linking.
+ write_to_bazelrc('build:cuda_clang --config=download_clang_use_lld')
+ write_to_bazelrc('test:cuda_clang --config=download_clang_use_lld')
else:
# Set up which gcc nvcc should use as the host compiler
# No need to set this on Windows