Updated msvc compile and link flag functions.

pull/15/head
Jussi Pakkanen 11 years ago
parent 668d679c01
commit 4c02a35fe0
  1. 18
      environment.py
  2. 2
      run_tests.py

@ -41,10 +41,16 @@ gnulike_buildtype_flags = {'plain' : [],
'release' : ['-O3'],
}
msvc_buildtype_flags = {'plain' : [],
'debug' : ["/MDd", "/Zi", "/Ob0", "/Od", "/RTC1"],
'debugoptimized' : ["/MD", "/Zi", "/O2", "/Ob1", "/D"],
'release' : ["/MD", "/O2", "/Ob2"]}
gnulike_buildtype_linker_flags = {'plain' : [],
'debug' : [],
'debugoptimized' : [],
'release' : ['-Wl,-O1']}
'release' : ['-Wl,-O1'],
}
msvc_buildtype_linker_flags = {'plain' : [],
'debug' : [],
@ -552,8 +558,11 @@ class VisualStudioCCompiler(CCompiler):
def get_std_warn_flags(self):
return VisualStudioCCompiler.std_warn_flags
def get_std_opt_flags(self):
return VisualStudioCCompiler.std_opt_flags
def get_buildtype_flags(self, buildtype):
return msvc_buildtype_flags[buildtype]
def get_buildtype_linker_flags(self, buildtype):
return msvc_buildtype_linker_flags[buildtype]
def get_pch_suffix(self):
return 'pch'
@ -853,6 +862,9 @@ class VisualStudioLinker():
def get_std_link_flags(self):
return []
def get_buildtype_linker_flags(self, buildtype):
return []
def get_output_flags(self, target):
return ['/OUT:' + target]

@ -25,7 +25,7 @@ test_build_dir = 'work area'
install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir')
meson_command = './meson.py'
msbuild_exe = None#shutil.which('msbuild')
msbuild_exe = shutil.which('msbuild')
if msbuild_exe is not None:
backend_flags = ['--backend=vs2010']

Loading…
Cancel
Save