aboutsummaryrefslogtreecommitdiff
path: root/environment.py
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 /environment.py
parent668d679c01175e8a8e5a300fd657c333ab151d43 (diff)
downloadmeson-4c02a35fe067d24ce97207a702dd2e46f2203849.zip
meson-4c02a35fe067d24ce97207a702dd2e46f2203849.tar.gz
meson-4c02a35fe067d24ce97207a702dd2e46f2203849.tar.bz2
Updated msvc compile and link flag functions.
Diffstat (limited to 'environment.py')
-rw-r--r--environment.py18
1 files changed, 15 insertions, 3 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]