aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-05-24 14:11:03 +0200
committerGravatar Irina Iancu <elenairina@google.com>2017-05-24 14:37:48 +0200
commitb7f82797934decadb9a74b329c11021575a3bcc7 (patch)
treed4072cc9d62e54cf927e9d7cf43799e6c31e8780 /tools
parentcfe0064c3fda13503bd5a74df1f455d0291106ff (diff)
Fix msvc_cl.py for cuda compilation
Passing /MT or /MD option using --compiler_options to nvcc Change-Id: Idf02ca0a4abf25bced397f5fffc1bc10ff0c160f PiperOrigin-RevId: 156976225
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp/wrapper/bin/pydir/msvc_cl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/cpp/wrapper/bin/pydir/msvc_cl.py b/tools/cpp/wrapper/bin/pydir/msvc_cl.py
index 4f4b685fc8..e35fdcb00e 100644
--- a/tools/cpp/wrapper/bin/pydir/msvc_cl.py
+++ b/tools/cpp/wrapper/bin/pydir/msvc_cl.py
@@ -125,7 +125,10 @@ class MsvcCompiler(msvc_tools.WindowsRunner):
if rt_idx >= 0:
parser.options[rt_idx] = rt
else:
- parser.options.append(rt)
+ if parser.is_cuda_compilation:
+ parser.options.append('--compiler-options="%s"' % rt)
+ else:
+ parser.options.append(rt)
compiler = 'cl'
if parser.is_cuda_compilation: