aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-04-16 21:38:49 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-04-16 21:38:49 +0300
commit4c02a35fe067d24ce97207a702dd2e46f2203849 (patch)
tree0fdfc3b4d97f734f3e7dc4047e9d1fd39a914eaa
parent668d679c01175e8a8e5a300fd657c333ab151d43 (diff)
downloadmeson-4c02a35fe067d24ce97207a702dd2e46f2203849.zip
meson-4c02a35fe067d24ce97207a702dd2e46f2203849.tar.gz
meson-4c02a35fe067d24ce97207a702dd2e46f2203849.tar.bz2
Updated msvc compile and link flag functions.
-rw-r--r--environment.py18
-rwxr-xr-xrun_tests.py2
2 files changed, 16 insertions, 4 deletions
diff --git a/environment.py b/environment.py
index 9f88154..b4c80e4 100644
--- a/environment.py
+++ b/environment.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]
diff --git a/run_tests.py b/run_tests.py
index ebf7d95..96fff21 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -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']