aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--environment.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/environment.py b/environment.py
index 251c679..cb77342 100644
--- a/environment.py
+++ b/environment.py
@@ -853,17 +853,22 @@ class RustCompiler():
class VisualStudioCCompiler(CCompiler):
std_warn_args = ['/W3']
std_opt_args= ['/O2']
- always_args = ['/nologo', '/showIncludes']
+ vs2010_always_args = ['/nologo', '/showIncludes']
+ vs2013_always_args = ['/nologo', '/showIncludes', '/FS']
def __init__(self, exelist, version, is_cross, exe_wrap):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrap)
self.id = 'msvc'
+ if int(version.split('.')[0]) > 17:
+ self.always_args = VisualStudioCCompiler.vs2013_always_args
+ else:
+ self.always_args = VisualStudioCCompiler.vs2010_always_args
def get_always_args(self):
- return VisualStudioCCompiler.always_args
+ return self.always_args
def get_std_warn_args(self):
- return VisualStudioCCompiler.std_warn_args
+ return self.std_warn_args
def get_buildtype_args(self, buildtype):
return msvc_buildtype_args[buildtype]