aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2018-07-11 11:18:13 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-11 11:21:34 -0700
commitf27d80d9ed508da4f74674a698870534a43da6bd (patch)
treea5200a5acd8601e7b37664afd3c3597430f3d80e /third_party/gpus
parente103c7b4fb2ac6ebf9472b3c2b01c35222872ae0 (diff)
Forward -w down to nvcc.
This makes --copt=-w silence warnings both in the host compiler and in the CUDA compiler. PiperOrigin-RevId: 204156508
Diffstat (limited to 'third_party/gpus')
-rwxr-xr-xthird_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
index 2558f46fd5..f4f4d0ee96 100755
--- a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
+++ b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
@@ -175,6 +175,11 @@ def InvokeNvcc(argv, log=False):
# any other reliable way to just get the list of source files to be compiled.
src_files = GetOptionValue(argv, 'c')
+ # Pass -w through from host to nvcc, but don't do anything fancier with
+ # warnings-related flags, since they're not necessarily the same across
+ # compilers.
+ warning_options = ' -w' if '-w' in argv else ''
+
if len(src_files) == 0:
return 1
if len(out_file) != 1:
@@ -205,6 +210,7 @@ def InvokeNvcc(argv, log=False):
nvccopts += defines
nvccopts += std_options
nvccopts += m_options
+ nvccopts += warning_options
if depfiles:
# Generate the dependency file