mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
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:
committed by
Facebook Github Bot
parent
a87d475c2f
commit
c78da0c6ed
@ -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
|
||||
|
Reference in New Issue
Block a user