From b7f82797934decadb9a74b329c11021575a3bcc7 Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Wed, 24 May 2017 14:11:03 +0200 Subject: Fix msvc_cl.py for cuda compilation Passing /MT or /MD option using --compiler_options to nvcc Change-Id: Idf02ca0a4abf25bced397f5fffc1bc10ff0c160f PiperOrigin-RevId: 156976225 --- tools/cpp/wrapper/bin/pydir/msvc_cl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/cpp/wrapper/bin') 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: -- cgit v1.2.3