Skip to content

Commit f27d80d

Browse files
Justin Lebartensorflower-gardener
authored andcommittedJul 11, 2018
Forward -w down to nvcc.
This makes --copt=-w silence warnings both in the host compiler and in the CUDA compiler. PiperOrigin-RevId: 204156508
1 parent e103c7b commit f27d80d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ def InvokeNvcc(argv, log=False):
175175
# any other reliable way to just get the list of source files to be compiled.
176176
src_files = GetOptionValue(argv, 'c')
177177

178+
# Pass -w through from host to nvcc, but don't do anything fancier with
179+
# warnings-related flags, since they're not necessarily the same across
180+
# compilers.
181+
warning_options = ' -w' if '-w' in argv else ''
182+
178183
if len(src_files) == 0:
179184
return 1
180185
if len(out_file) != 1:
@@ -205,6 +210,7 @@ def InvokeNvcc(argv, log=False):
205210
nvccopts += defines
206211
nvccopts += std_options
207212
nvccopts += m_options
213+
nvccopts += warning_options
208214

209215
if depfiles:
210216
# Generate the dependency file

0 commit comments

Comments
 (0)
Please sign in to comment.