Enable using CMD when building cpp extensions on Windows

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17706

Differential Revision: D14346482

Pulled By: ezyang

fbshipit-source-id: 7c85e51c701f6c0947ad324ef19fafda40ae1cb9
This commit is contained in:
peter
2019-03-06 14:40:05 -08:00
committed by Facebook Github Bot
parent a87d475c2f
commit c78da0c6ed
3 changed files with 3 additions and 6 deletions

View File

@ -318,7 +318,7 @@ class BuildExtension(build_ext, object):
'/wd4819', '-Xcompiler', '/MD'
] + include_list + cflags
elif isinstance(self.cflags, dict):
cflags = self.cflags['cxx']
cflags = self.cflags['cxx'] + ['/MD']
cmd += cflags
elif isinstance(self.cflags, list):
cflags = self.cflags